/* =========================================
   TUTORDS I18N COMPONENTS STYLES
   Sistema de internacionalización visual
   ========================================= */

/* LANGUAGE SELECTOR ENHANCED */
.language-selector {
    position: relative;
    display: inline-block;
    font-family: var(--font-body);
}

.language-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: var(--heading-color);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 80px;
    justify-content: center;
}

.language-button:hover {
    background: rgba(255, 182, 193, 0.1);
    border-color: #E91E63;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.25);
}

.language-button:focus {
    outline: none;
    border-color: #E91E63;
    box-shadow: 0 0 0 3px rgba(255, 182, 193, 0.25);
}

.language-selector.open .language-button {
    background: #E91E63;
    color: white;
    border-color: #E91E63;
}

.language-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.language-code {
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.globe-icon,
.chevron-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.language-selector.open .chevron-icon {
    transform: rotate(180deg);
}

/* LANGUAGE DROPDOWN */
.language-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid rgba(233, 30, 99, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(255, 182, 193, 0.25);
    backdrop-filter: blur(20px);
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease-out;
    min-width: 200px;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.language-option {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    background: none !important;
    border: none !important;
    color: var(--body-text-color) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    text-align: left !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    font-family: inherit !important;
}

.language-option:last-child {
    border-bottom: none !important;
}

.language-option:hover {
    background-color: rgba(255, 182, 193, 0.1) !important;
}

.language-option:focus {
    outline: none !important;
    background-color: rgba(255, 182, 193, 0.1) !important;
}

.language-option.active {
    background: rgba(233, 30, 99, 0.08) !important;
    color: var(--primary-color) !important;
    font-weight: 500 !important;
}

.language-option .language-flag {
    font-size: 16px !important;
    min-width: 20px !important;
    flex-shrink: 0 !important;
}

.language-option .language-name {
    flex: 1 !important;
    font-size: 14px !important;
}

.check-icon {
    width: 16px !important;
    height: 16px !important;
    color: var(--primary-color) !important;
    stroke-width: 2 !important;
    flex-shrink: 0 !important;
}

/* TIER INDICATORS REMOVED */

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .language-dropdown {
        min-width: 180px;
        right: 0;
        left: auto;
    }
    
    .language-option {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .language-button {
        padding: 10px 14px;
        min-width: 70px;
    }
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
    .language-button {
        background: rgba(31, 41, 55, 0.95);
        border-color: rgba(245, 158, 11, 0.3);
        color: #f9fafb;
    }
    
    .language-dropdown {
        background: #1f2937;
        border-color: rgba(245, 158, 11, 0.2);
    }
    
    .language-option {
        color: #e5e7eb;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .language-option:hover,
    .language-option:focus {
        background: rgba(245, 158, 11, 0.15);
        color: #fbbf24;
    }
    
    .language-option.active {
        background: rgba(245, 158, 11, 0.25);
        color: #fbbf24;
    }
}

/* HIGH CONTRAST MODE */
@media (prefers-contrast: high) {
    .language-button {
        border-width: 2px;
        font-weight: 600;
    }
    
    .language-option {
        border-bottom-width: 2px;
    }
    
    .language-option:hover,
    .language-option:focus,
    .language-option.active {
        background: var(--primary-color);
        color: white;
    }
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
    .language-button,
    .language-option,
    .chevron-icon {
        transition: none;
    }
    
    .language-dropdown {
        animation: none;
    }
}

/* I18N TRANSITION EFFECTS */
.i18n-transitioning {
    opacity: 0.7;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.i18n-transition-complete {
    opacity: 1;
    pointer-events: auto;
}

/* LANGUAGE LOADING STATE */
.language-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: languageLoadingSpinner 0.8s linear infinite;
}

@keyframes languageLoadingSpinner {
    to {
        transform: rotate(360deg);
    }
}

/* RTL SUPPORT */
[dir="rtl"] .language-dropdown {
    left: auto;
    right: 0;
}

[dir="rtl"] .language-option {
    text-align: right;
}

[dir="rtl"] .language-flag {
    order: 2;
}

[dir="rtl"] .language-name {
    order: 1;
}

[dir="rtl"] .check-icon {
    order: 0;
}

/* ACCESSIBILITY IMPROVEMENTS */
.language-selector:focus-within .language-dropdown {
    border-color: var(--primary-color);
}

.language-option[aria-selected="true"] {
    background: var(--primary-color);
    color: white;
}

/* TIER SPECIFIC STYLING REMOVED */
