/**
 * Law Firm Luxury Language Switcher Styles
 */

.cv-lang-switcher {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    z-index: 1000;
}

.cv-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(17, 20, 26, 0.05);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-switcher-btn:hover,
.cv-lang-switcher.is-open .cv-switcher-btn {
    background: #11141a;
    color: #c5a059;
    border-color: #c5a059;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.2);
}

.cv-flag {
    font-size: 15px;
    line-height: 1;
    display: inline-block;
}

.cv-lang-code {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cv-chevron {
    transition: transform 0.25s ease;
}

.cv-lang-switcher.is-open .cv-chevron {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.cv-switcher-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #11141a;
    border: 1px solid rgba(197, 160, 89, 0.35);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    padding: 6px 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10001;
}

/* Open state */
.cv-lang-switcher.is-open .cv-switcher-menu,
.cv-lang-switcher:hover .cv-switcher-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cv-switcher-item {
    margin: 0;
    padding: 0;
}

.cv-switcher-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.cv-switcher-link:hover {
    background: rgba(197, 160, 89, 0.15);
    color: #c5a059;
    padding-left: 18px;
}

.cv-switcher-item.is-active .cv-switcher-link {
    color: #c5a059;
    font-weight: 700;
    background: rgba(197, 160, 89, 0.08);
}

.cv-native-name {
    flex-grow: 1;
    font-size: 13px;
}

.cv-code-pill {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #94a3b8;
    font-weight: 600;
}

.cv-switcher-item.is-active .cv-code-pill {
    background: rgba(197, 160, 89, 0.2);
    color: #c5a059;
}

/* RTL Adjustments for Switcher */
body[dir="rtl"] .cv-switcher-menu,
.cv-lang-ar .cv-switcher-menu {
    right: auto;
    left: 0;
}

body[dir="rtl"] .cv-switcher-link:hover,
.cv-lang-ar .cv-switcher-link:hover {
    padding-left: 14px;
    padding-right: 18px;
}

/* Top bar integration styling — Desktop only */
#cv-topbar-switcher {
    display: none !important;
}

@media (min-width: 1024px) {
    #cv-topbar-switcher {
        display: inline-flex !important;
        margin-left: 16px;
    }

    body[dir="rtl"] #cv-topbar-switcher,
    .cv-lang-ar #cv-topbar-switcher {
        margin-left: 0;
        margin-right: 16px;
    }
}

/* Mobile Nav Drawer Switcher */
#cv-mobile-switcher {
    display: block;
    width: 100%;
    padding: 8px 0 12px;
}

#cv-mobile-switcher .cv-lang-switcher {
    width: 100%;
    display: block;
}

#cv-mobile-switcher .cv-switcher-btn {
    width: 100%;
    justify-content: space-between;
    padding: 9px 14px;
    background: #ffffff;
    border: 1px solid rgba(197, 160, 89, 0.4);
    border-radius: 8px;
    color: #11141a;
    font-size: 13px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#cv-mobile-switcher .cv-switcher-menu {
    position: static;
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: none;
    box-shadow: none;
    border: 1px solid rgba(197, 160, 89, 0.25);
    border-radius: 8px;
    background: #ffffff;
    margin-top: 8px;
    padding: 4px 0;
    width: 100%;
    transition: all 0.2s ease;
}

#cv-mobile-switcher .cv-lang-switcher.is-open .cv-switcher-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}

#cv-mobile-switcher .cv-switcher-link {
    padding: 10px 14px;
    color: #11141a;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

#cv-mobile-switcher .cv-switcher-item:last-child .cv-switcher-link {
    border-bottom: none;
}

#cv-mobile-switcher .cv-switcher-link:hover,
#cv-mobile-switcher .cv-switcher-item.is-active .cv-switcher-link {
    background: rgba(197, 160, 89, 0.12);
    color: #93712b;
}
