/* i18n Dropdown Styles */
.lang-selector {
    position: relative;
    display: inline-block;
    z-index: 1050;
}

.globe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(239, 5, 72, 0.08);
    border: 1.5px solid rgba(239, 5, 72, 0.18);
    border-radius: 50%;
    cursor: pointer;
    color: #EF0548;
    padding: 0;
    transition: var(--transition-smooth, all 0.25s ease);
}

.globe-btn svg {
    width: 17px;
    height: 17px;
    display: block;
}

.globe-btn:hover {
    background: #EF0548;
    border-color: #EF0548;
    color: #fff;
    transform: scale(1.06);
}

html[data-theme="dark"] .globe-btn {
    background: rgba(239, 5, 72, 0.14);
    border-color: rgba(239, 5, 72, 0.3);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 140px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.lang-dropdown button {
    background: transparent;
    border: none;
    text-align: left;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
    transition: background 0.2s, color 0.2s;
    font-family: inherit;
    font-weight: 500;
}

.lang-dropdown button:hover {
    background: rgba(239, 5, 72, 0.1);
    color: #EF0548;
}

.lang-dropdown button.active {
    background: #EF0548;
    color: white;
    font-weight: 600;
}

.lang-dropdown button.active::after {
    content: ' ✓';
    float: right;
}

/* RTL Support */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] .header-right {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
    text-align: right;
}

html[dir="rtl"] .lang-dropdown button.active::after {
    float: left;
}

/* Add basic fading animation for switching */
.lang-fade {
    animation: langFadeIn 0.25s ease-in-out forwards;
}

@keyframes langFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@media (max-width: 1199px) {
    .mobile-nav__cta .lang-selector {
        margin: 15px auto;
        display: block;
        text-align: center;
        width: 100%;
    }

    .mobile-nav__cta .lang-dropdown {
        position: static;
        left: auto;
        right: auto;
        transform: none;
        width: 100%;
        max-width: 220px;
        margin: 0 auto;
        max-height: 0;
        padding: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        border: none;
        box-shadow: none;
        transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.25s ease;
    }

    .mobile-nav__cta .lang-dropdown.show {
        max-height: 400px;
        opacity: 1;
        visibility: visible;
        padding: 8px 0;
        margin-top: 10px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
        transform: none;
    }
}
