/* =====================================================
   RYO Platform - Language Selector Styles
   ===================================================== */

.lang-selector-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 1000;
}

.lang-selector-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.lang-selector-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(242, 101, 34, 0.5);
    transform: translateY(-1px);
}

.lang-selector-btn .fa-globe {
    font-size: 16px;
    color: #F26522;
}

.lang-selector-current {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lang-chevron {
    font-size: 10px;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.lang-dropdown.show + .lang-selector-btn .lang-chevron,
.lang-selector-wrapper:has(.lang-dropdown.show) .lang-chevron {
    transform: rotate(180deg);
}

/* Dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(30, 30, 50, 0.98);
    border: 1px solid rgba(242, 101, 34, 0.3);
    border-radius: 12px;
    min-width: 160px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.lang-option:hover {
    background: rgba(242, 101, 34, 0.15);
    color: white;
}

.lang-option.active {
    background: rgba(242, 101, 34, 0.25);
    color: #F26522;
    font-weight: 600;
}

.lang-option .lang-flag {
    font-size: 18px;
    line-height: 1;
}

.lang-option + .lang-option {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* =====================================================
   LIGHT THEME VARIANT (for pages with light backgrounds)
   ===================================================== */

.light-theme .lang-selector-btn,
.agent-login-form .lang-selector-btn,
.login-branding .lang-selector-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
    color: #333;
}

.light-theme .lang-selector-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: #F26522;
}

/* =====================================================
   AGENT MANAGEMENT SPECIFIC OVERRIDES
   ===================================================== */

.modern-header .lang-selector-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.modern-header .lang-selector-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.login-wrapper .lang-selector-wrapper {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.login-wrapper .lang-selector-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {
    .lang-selector-btn {
        padding: 6px 10px;
        font-size: 13px;
        gap: 6px;
    }

    .lang-selector-btn .fa-globe {
        font-size: 14px;
    }

    .lang-dropdown {
        min-width: 140px;
        right: 0;
    }

    .lang-option {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .lang-selector-btn span.lang-selector-current {
        display: inline;
    }
    
    .lang-chevron {
        display: none;
    }
}
