/**
 * Language Switcher Styles
 * Styled to match the Cyberry Design System (Cyberry_DESIGN.md).
 * Sticky corner / floating box and inline language switcher component.
 */

:root {
    --lang-purple: #7B3FE4;
    --lang-purple-dark: #5A2DB0;
    --lang-purple-light: #EDE9FF;
    --lang-bg-white: #FFFFFF;
    --lang-bg-subtle: #F8F8FC;
    --lang-bg-dark: #111111;
    --lang-bg-dark-2: #1A1A1A;
    --lang-text: #111111;
    --lang-text-secondary: #555555;
    --lang-text-muted: #888888;
    --lang-border: #E5E5E5;
    --lang-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --lang-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --lang-shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.14);
    --lang-transition: all 0.2s ease;
}

/* Main Container Base */
.lang-switcher {
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    z-index: 99990;
}

.lang-switcher *,
.lang-switcher *::before,
.lang-switcher *::after {
    box-sizing: border-box;
}

/* Sticky Corner Positioning */
.lang-switcher.lang-pos-bottom-right {
    position: fixed;
    bottom: 24px;
    right: 24px;
}

.lang-switcher.lang-pos-bottom-left {
    position: fixed;
    bottom: 24px;
    left: 24px;
}

.lang-switcher.lang-pos-top-right {
    position: fixed;
    top: 24px;
    right: 24px;
}

.lang-switcher.lang-pos-top-left {
    position: fixed;
    top: 24px;
    left: 24px;
}

.lang-switcher.lang-pos-inline {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

/* Inner Container Box */
.lang-switcher-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 6px;
    border-radius: 999px;
    box-shadow: var(--lang-shadow-md);
    transition: var(--lang-transition);
}

.lang-switcher:hover .lang-switcher-inner {
    box-shadow: var(--lang-shadow-lg);
    /* Note: hover y-shift removed as requested */
}

/* Glassmorphism Theme (Default) */
.lang-theme-glass .lang-switcher-inner {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 229, 229, 0.9);
}

/* Light Theme */
.lang-theme-light .lang-switcher-inner {
    background: var(--lang-bg-white);
    border: 1px solid var(--lang-border);
}

/* Dark Theme (Cyberry Dark System) */
.lang-theme-dark .lang-switcher-inner {
    background: var(--lang-bg-dark);
    border: 1px solid #262626;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

/* Language Buttons */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--lang-text-secondary);
    text-decoration: none !important;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: var(--lang-transition);
    position: relative;
    cursor: pointer;
}

.lang-theme-dark .lang-btn {
    color: var(--lang-text-muted);
}

.lang-btn:hover {
    color: var(--lang-purple);
    background: var(--lang-bg-subtle);
    text-decoration: none !important;
}

.lang-theme-dark .lang-btn:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.07);
}

/* Active Language State - Badges / Tags style according to Cyberry Design */
.lang-btn.is-active {
    color: var(--lang-purple);
    background: var(--lang-purple-light);
    font-weight: 600;
    cursor: default;
}

.lang-theme-dark .lang-btn.is-active {
    color: #FFFFFF;
    background: var(--lang-bg-dark-2);
    border: 1px solid rgba(123, 63, 228, 0.45);
    box-shadow: 0 0 10px rgba(123, 63, 228, 0.2);
}

/* Active Indicator Dot */
.lang-active-indicator {
    width: 5px;
    height: 5px;
    background-color: var(--lang-purple);
    border-radius: 50%;
    display: inline-block;
    margin-left: 2px;
    box-shadow: 0 0 6px rgba(123, 63, 228, 0.6);
}

.lang-theme-dark .lang-active-indicator {
    background-color: #9D6AFF;
    box-shadow: 0 0 8px rgba(157, 106, 255, 0.8);
}

/* Flag Icon Styling */
.lang-flag-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: var(--lang-shadow-sm);
    flex-shrink: 0;
    line-height: 0;
}

.lang-flag {
    display: block;
    width: 18px;
    height: 13px;
    object-fit: cover;
}

/* Label Text */
.lang-label {
    font-size: 13px;
    text-transform: uppercase;
}

/* Divider Line between Languages */
.lang-divider {
    width: 1px;
    height: 14px;
    background-color: var(--lang-border);
    opacity: 0.8;
    margin: 0 1px;
}

.lang-theme-dark .lang-divider {
    background-color: #333333;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .lang-switcher.lang-pos-bottom-right {
        bottom: 16px;
        right: 16px;
    }

    .lang-switcher.lang-pos-bottom-left {
        bottom: 16px;
        left: 16px;
    }

    .lang-switcher.lang-pos-top-right {
        top: 16px;
        right: 16px;
    }

    .lang-switcher.lang-pos-top-left {
        top: 16px;
        left: 16px;
    }

    .lang-btn {
        padding: 5px 9px;
        font-size: 12px;
    }
}
