/* ============================================================
   BIOAUREA - Language Selector Styles
   Custom language selector (replaces unstable Google Translate widget)
   ============================================================ */

/* ===== HIDE GOOGLE TRANSLATE UNWANTED ELEMENTS ===== */
.goog-te-banner-frame.skiptranslate,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-te-menu-frame,
.goog-te-menu2,
.goog-te-gadget-icon,
#goog-gt-vt,
.goog-te-spinner-pos {
    display: none !important;
    visibility: hidden !important;
}

body {
    top: 0 !important;
    position: relative !important;
}

iframe.goog-te-banner-frame,
iframe.skiptranslate {
    display: none !important;
    height: 0 !important;
    visibility: hidden !important;
}

.skiptranslate {
    display: none !important;
}

/* Fix body margin when Google adds its bar */
body.translated-ltr,
body.translated-rtl {
    top: 0 !important;
}

/* Hide the original google element - we use our custom one */
#google_translate_element {
    display: none !important;
}

/* ===== CUSTOM LANGUAGE SELECTOR ===== */
.lang-selector-wrapper {
    display: flex !important;
    align-items: center !important;
    position: relative;
    z-index: 10005;
    flex-shrink: 0;
}

.custom-lang-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(0,255,136,0.3);
    border-radius: 25px;
    color: #fff;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.lang-btn:hover {
    background: rgba(0,255,136,0.12);
    border-color: rgba(0,255,136,0.5);
    box-shadow: 0 0 15px rgba(0,255,136,0.2);
}

.lang-btn .lang-icon {
    font-size: 1.1em;
    transition: transform 0.3s;
}

.lang-btn:hover .lang-icon {
    transform: scale(1.15);
}

.lang-btn .lang-text {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-btn .lang-arrow {
    font-size: 0.7em;
    transition: transform 0.3s;
    opacity: 0.7;
}

.custom-lang-selector.open .lang-arrow {
    transform: rotate(180deg);
}

/* ===== LANGUAGE DROPDOWN ===== */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #1a1a1a;
    border: 1px solid rgba(0,255,136,0.25);
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10010;
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
}

.custom-lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-dropdown::-webkit-scrollbar {
    width: 5px;
}

.lang-dropdown::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}

.lang-dropdown::-webkit-scrollbar-thumb {
    background: rgba(0,255,136,0.3);
    border-radius: 10px;
}

/* ===== LANGUAGE OPTIONS ===== */
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #ccc;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.lang-option:hover {
    background: rgba(0,255,136,0.08);
    color: #00e07a;
}

.lang-option.active {
    background: rgba(0,255,136,0.12);
    color: #00ff88;
}

.lang-option .lang-flag {
    font-size: 1.2em;
    width: 24px;
    text-align: center;
}

.lang-option .lang-name {
    flex: 1;
}

.lang-option .lang-check {
    color: #00ff88;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.2s;
}

.lang-option.active .lang-check {
    opacity: 1;
}

/* Divider between language groups */
.lang-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 4px 0;
}

/* ===== FIX FOR TRANSLATED TEXT STYLING ===== */
font[style], font {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* ===== MOBILE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8em;
        gap: 6px;
    }
    
    .lang-btn .lang-text {
        display: none;
    }
    
    .lang-btn .lang-arrow {
        display: none;
    }
    
    .lang-dropdown {
        right: -10px;
        min-width: 160px;
    }
    
    .lang-option {
        padding: 10px 14px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .lang-btn {
        padding: 6px 10px;
        border-radius: 20px;
    }
    
    .lang-btn .lang-icon {
        font-size: 1em;
    }
}
