/* ========================================
   Google Translate Custom Styles
   ======================================== */

/* Hide the Google Translate banner and unwanted elements */
body {
    top: 0 !important;
}

.skiptranslate,
#google_translate_element {
    display: none !important;
}

body > .skiptranslate {
    display: none !important;
}

.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body > iframe.skiptranslate {
    display: none !important;
    height: 0 !important;
}

/* Remove Google Translate top banner */
.goog-te-banner-frame {
    display: none !important;
}

/* Fix body margin when Google Translate is active */
body {
    top: 0 !important;
    position: static !important;
}

/* Hide the powered by text */
.goog-logo-link {
    display: none !important;
}

.goog-te-gadget {
    color: transparent !important;
}

.goog-te-gadget .goog-te-combo {
    color: #333 !important;
}

/* Style the language selector to match site design */
.goog-te-combo {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font-size: 14px;
}

/* Custom language dropdown styling for desktop */
@media only screen and (min-width: 992px) {
    .header-top-curr .dropdown-toggle {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 14px;
        padding: 5px 15px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .header-top-curr .dropdown-toggle:hover {
        color: #ddd;
    }
    
    .header-top-curr .dropdown-menu {
        min-width: 200px;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border: 1px solid #e0e0e0;
        padding: 8px 0;
    }
    
    .header-top-curr .dropdown-item {
        padding: 10px 20px;
        font-size: 14px;
        color: #2e2e2e;
        transition: all 0.2s ease;
    }
    
    .header-top-curr .dropdown-item:hover {
        background: #f5f5f5;
        color: #000;
        padding-left: 25px;
    }
    
    .header-top-curr .dropdown-item:active {
        background: #000;
        color: #fff;
    }
}

/* Smooth scroll behavior when changing language */
html {
    scroll-behavior: smooth;
}

/* Ensure proper z-index for dropdown */
.header-top-curr.dropdown {
    position: relative;
    z-index: 1000;
}

.header-top-curr .dropdown-menu {
    z-index: 1001;
}

/* Animation for dropdown */
.header-top-curr .dropdown-menu.show {
    animation: slideInDown 0.3s ease-in-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state */
.lang-select {
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-select:hover {
    transform: translateX(5px);
}

/* Active language indicator */
.header-top-curr .dropdown-item.active {
    background: #000;
    color: #fff;
    font-weight: 600;
}

/* Better visibility for current language text */
#currentLanguage {
    font-weight: 500;
    color: #fff;
}

/* ========================================
   Fixed Action Buttons
   ======================================== */

/* Mobile Language Selector - Bottom Left */
.mobile-language-selector {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
}

.mobile-lang-btn {
    min-width: 80px;
    height: 50px;
    border-radius: 0;
    background: #fff;
    color: #333;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0 20px;
}

.mobile-lang-btn i {
    display: none;
}

.mobile-lang-btn span {
    font-size: 24px;
    margin: 0;
}

.mobile-lang-btn::after {
    content: "DE";
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-left: 5px;
}

/* Mise à jour dynamique du code langue */
.mobile-lang-btn[data-lang-code="EN"]::after { content: "EN"; }
.mobile-lang-btn[data-lang-code="FR"]::after { content: "FR"; }
.mobile-lang-btn[data-lang-code="ES"]::after { content: "ES"; }
.mobile-lang-btn[data-lang-code="IT"]::after { content: "IT"; }
.mobile-lang-btn[data-lang-code="PL"]::after { content: "PL"; }
.mobile-lang-btn[data-lang-code="NL"]::after { content: "NL"; }
.mobile-lang-btn[data-lang-code="PT"]::after { content: "PT"; }
.mobile-lang-btn[data-lang-code="CS"]::after { content: "CS"; }
.mobile-lang-btn[data-lang-code="RU"]::after { content: "RU"; }
.mobile-lang-btn[data-lang-code="TR"]::after { content: "TR"; }
.mobile-lang-btn[data-lang-code="CN"]::after { content: "CN"; }

.mobile-lang-btn::before {
    content: "▲";
    font-size: 10px;
    color: #666;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-lang-btn:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.mobile-lang-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
    animation: slideUpFade 0.3s ease;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-lang-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f5f5f5;
    border-radius: 12px 12px 0 0;
}

.mobile-lang-header span {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.mobile-lang-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-lang-close:hover {
    color: #000;
}

.mobile-lang-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.mobile-lang-list li {
    margin: 0;
}

.mobile-lang-list a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s ease;
}

.mobile-lang-list a:hover {
    background: #f5f5f5;
    padding-left: 25px;
    color: #000;
}

/* WhatsApp Button - Bottom Right */
.whatsapp-btn {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9997;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: scale(1.1);
    color: #fff;
}

.whatsapp-btn i {
    line-height: 1;
}

/* Responsive adjustments */
@media (min-width: 992px) {
    .mobile-language-selector {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .mobile-lang-btn {
        min-width: 70px;
        height: 45px;
        font-size: 20px;
        padding: 0 15px;
    }
    
    .mobile-lang-btn span {
        font-size: 20px;
    }
    
    .mobile-lang-btn::after {
        font-size: 14px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 80px;
    }
    
    .mobile-language-selector {
        bottom: 15px;
        left: 15px;
    }
    
    .mobile-lang-menu {
        min-width: 220px;
    }
}
