/*--------------------------------------------------------------
# Language Switcher Button - Floating, Self-Contained
--------------------------------------------------------------*/

/* Floating Button Container */
.language-switcher-button {
    position: fixed;
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Base Button Styles */
.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
}

.lang-btn:active {
    transform: translateY(0);
}

/* Icon Styles */
.lang-btn i {
    font-size: 20px;
    line-height: 1;
}

/* Flag Emoji */
.lang-flag {
    font-size: 24px;
    line-height: 1;
    display: inline-block;
}

/* Chevron Icon */
.lang-chevron {
    font-size: 14px !important;
    transition: transform 0.3s ease;
}

.lang-btn.active .lang-chevron {
    transform: rotate(180deg);
}

/* Text Label (hidden on mobile) */
.lang-btn-text {
    display: none;
}

@media (min-width: 768px) {
    .lang-btn-text {
        display: inline;
    }
}

/* Mobile: Flag Only */
@media (max-width: 767px) {
    /* Adjust button to circular shape */
    .lang-btn {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .lang-flag {
        font-size: 28px;
    }

    .lang-chevron {
        display: none !important;
    }

    /* Adjust spacing for mobile - maintains consistent gap with login button */
    .language-switcher-button {
        right: 125px !important;
    }
}

/* Dropdown Menu */
.lang-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 10px;
    min-width: 80px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

/* Dropdown Items */
.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #333333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.lang-dropdown-item:last-child {
    border-bottom: none;
}

.lang-dropdown-item:hover {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

.lang-dropdown-item .lang-flag {
    font-size: 20px;
}

/* Mobile Dropdown Adjustment */
@media (max-width: 767px) {
    .lang-dropdown {
        right: 50%;
        transform: translateX(50%) translateY(10px);
    }

    .lang-dropdown.show {
        transform: translateX(50%) translateY(0);
    }
}

/* Position Variants */
.language-switcher-button[data-position="bottom-left"] {
    bottom: var(--lang-btn-bottom, 30px);
    left: var(--lang-btn-left, 100px);
    right: auto;
}

.language-switcher-button[data-position="top-right"] {
    top: var(--lang-btn-top, 30px);
    right: var(--lang-btn-right, 100px);
    bottom: auto;
}

.language-switcher-button[data-position="top-left"] {
    top: var(--lang-btn-top, 30px);
    left: var(--lang-btn-left, 100px);
    bottom: auto;
    right: auto;
}
