/**
 * Tabeebo Comment Translation CSS (SEO Optimized)
 * Styles for the translation UI with structured data compliance
 */

/* Translation wrapper - designed to not interfere with comment structure */
.tabeebo-translation-wrapper {
    margin-top: 10px;
    padding: 8px 0;
    border-top: 1px solid #e1e5e9;
    clear: both;
}

/* View Translation button styling */
.view-translation {
    background: #0073aa;
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    font-family: inherit;
    line-height: 1.4;
}

.view-translation:hover,
.view-translation:focus {
    background: #005a87;
    color: #ffffff;
    outline: 2px solid #005a87;
    outline-offset: 2px;
}

.view-translation:active {
    background: #004a73;
    transform: translateY(1px);
}

.view-translation.focused {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0073aa;
}

/* Translation container */
.translation-container {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

/* Translation content */
.comment-translation {
    margin: 0;
}

.translation-text {
    margin-bottom: 8px;
    color: #333333;
    font-style: italic;
}

.translation-meta {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

.translation-language {
    color: #666666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Error styling */
.translation-error {
    color: #dc3545;
    font-style: italic;
    margin: 0;
}

/* Rating display */
.comment-rating {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    font-size: 16px;
    line-height: 1;
}

.star.filled {
    color: #ffc107;
}

.star.empty {
    color: #e9ecef;
}

.rating-value {
    font-size: 12px;
    color: #666666;
    font-weight: 500;
}

/* RTL support for Arabic and Persian */
[dir="rtl"] .tabeebo-translation-wrapper {
    text-align: right;
}

[dir="rtl"] .view-translation {
    margin-left: 0;
    margin-right: 0;
}

[dir="rtl"] .comment-rating {
    flex-direction: row-reverse;
}

[dir="rtl"] .rating-stars {
    flex-direction: row-reverse;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .view-translation {
        font-size: 11px;
        padding: 5px 10px;
    }
    
    .translation-container {
        padding: 10px;
        font-size: 13px;
    }
    
    .star {
        font-size: 14px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .view-translation {
        border: 2px solid #000000;
    }
    
    .translation-container {
        border: 2px solid #000000;
    }
    
    .star.filled {
        color: #000000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .view-translation {
        transition: none;
    }
    
    .view-translation:active {
        transform: none;
    }
}

/* Print styles */
@media print {
    .tabeebo-translation-wrapper {
        display: none;
    }
}

/* Focus visible for better accessibility */
.view-translation:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Loading state */
.translation-container p {
    margin: 0;
    padding: 0;
}

/* Ensure proper spacing in different themes */
.comment-content .tabeebo-translation-wrapper {
    margin-top: 15px;
}

/* Prevent layout shifts */
.translation-container[style*="display: none"] {
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: none;
}

