/* Language Switcher Styles - Matches FC24 Theme Design */

/* Base Styles */
.fc-lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.fc-lang-toggle {
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1;
    border: 1px solid white;
    border-radius: 8px;
}

.fc-lang-toggle:hover svg path {
    fill: #08070F;
}

.fc-lang-toggle svg path {
    fill: white;
    transition: fill 0.3s ease;
}

.fc-lang-toggle svg:not(.fc-lang-arrow) {
    display: block;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.fc-lang-toggle .fc-lang-arrow {
    display: block;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    width: 8px;
    height: 6px;
}

.fc-lang-toggle[aria-expanded="true"] {
    border-color: #B6D04C;
}

.fc-lang-toggle[aria-expanded="true"] .fc-lang-arrow {
    transform: rotate(180deg);
}

/* Dropdown Styles */
.fc-lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #08070F;
    border: 1px solid #39393F;
    border-radius: 12px;
    padding: 8px;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

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

/* Dropdown Options */
.fc-lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    gap: 10px;
    font-size: 14px;
    line-height: 1.2;
}

.fc-lang-option:hover {
    background: rgba(182, 208, 76, 0.15);
    color: #B6D04C;
}

.fc-lang-option.active {
    background: rgba(182, 208, 76, 0.1);
    color: #B6D04C;
    pointer-events: none;
}

.fc-lang-option .fc-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.5px;
    min-width: 32px;
    height: 20px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-transform: uppercase;
}

.fc-lang-option:hover .fc-lang-flag {
    background: rgba(182, 208, 76, 0.2);
}

.fc-lang-option.active .fc-lang-flag {
    background: #B6D04C;
    color: #08070F;
}

.fc-lang-option .fc-lang-name {
    flex: 1;
    font-size: 14px;
}

/* Header Specific Styles */
.fc-lang-header .fc-lang-dropdown {
    right: 0;
    left: auto;
}

/* Footer Specific Styles */
.footer-lang-wrapper {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fc-lang-footer .fc-lang-toggle {
    min-width: 140px;
    justify-content: space-between;
}

.fc-lang-footer .fc-lang-dropdown {
    bottom: calc(100% + 8px);
    top: auto;
    transform: translateY(12px);
    left: 0;
    right: auto;
}

.fc-lang-switcher.fc-active.fc-lang-footer .fc-lang-dropdown {
    transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fc-lang-header {
        order: -1;
    }

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

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

    .fc-lang-option .fc-lang-flag {
        min-width: 28px;
        font-size: 10px;
    }
}

/* Accessibility - Focus States */
.fc-lang-toggle:focus-visible {
    outline: 2px solid #B6D04C;
    outline-offset: 2px;
}

.fc-lang-option:focus-visible {
    outline: 2px solid #B6D04C;
    outline-offset: -2px;
}


/* Fix z-index conflicts with global search */
.fc-lang-switcher {
    z-index: 9998;
}

#global-search-wrapper {
    z-index: 99999;
}

/* Loading state (optional) */
.fc-lang-option.loading {
    opacity: 0.5;
    pointer-events: none;
}

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

[dir="rtl"] .fc-lang-header .fc-lang-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .fc-lang-footer .fc-lang-dropdown {
    right: 0;
    left: auto;
}
