/* Auto-generated language switcher - only shows if no header switcher exists */
.lang-switcher-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.lang-switcher-fixed:hover {
    opacity: 1;
}

.lang-switcher-fixed * {
    box-sizing: border-box;
}

.lang-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
}

.lang-switcher-btn:hover {
    background: rgba(30, 41, 59, 0.95);
}

/* Nav Inline Styles */
.lang-switcher-nav {
    display: inline-flex;
    align-items: center;
    margin-left: 20px;
    position: relative;
    z-index: 100;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.lang-switcher-nav .lang-switcher-btn {
    background: transparent;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #64748b;
    /* Use softer text color to match nav links often */
    box-shadow: none;
    padding: 6px 12px;
}

.lang-switcher-nav .lang-switcher-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
    border-color: rgba(148, 163, 184, 0.5);
}

/* Menu logic tailored for inline */
.lang-switcher-nav .lang-switcher-menu {
    top: calc(100% + 8px);
    bottom: auto;
    /* Override fixed positioning */
    right: 0;
}

/* Shared Menu Styles */
.lang-switcher-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    /* Default for fixed */
    right: 0;
    min-width: 140px;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 10000;
}

.lang-switcher-menu.show {
    display: block;
}

.lang-switcher-menu a {
    display: block;
    padding: 8px 14px;
    color: #f8fafc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.lang-switcher-menu a:hover,
.lang-switcher-menu a.active {
    background: rgba(148, 163, 184, 0.2);
}

.lang-switcher-fixed .lang-switcher-label {
    white-space: nowrap;
}

/* Don't hide existing switchers - they're part of the design */
/* Pages with header switchers won't show the fixed one */

@media (max-width: 640px) {
    .lang-switcher-fixed {
        bottom: 12px;
        right: 12px;
    }

    .lang-switcher-btn {
        font-size: 0.8rem;
        padding: 6px 10px;
    }
}