/* ==========================================================================
   LangSynC Frontend Styles — Language Switcher with Custom Colors
   ========================================================================== */

/* Floating Switcher Container */
.langsynC-switcher-floating {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.langsynC-pos-bottom-right { bottom: 24px; right: 24px; }
.langsynC-pos-bottom-left  { bottom: 24px; left: 24px; }
.langsynC-pos-top-right    { top: 24px; right: 24px; }
.langsynC-pos-top-left     { top: 24px; left: 24px; }

/* Inline Switcher */
.langsynC-switcher-inline {
    display: inline-block;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toggle Button — uses custom colors */
.langsynC-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--langsynC-primary, #667eea), var(--langsynC-secondary, #764ba2));
    border: none;
    border-radius: 50px;
    color: var(--langsynC-btn-text, #fff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.langsynC-switcher-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.langsynC-switcher-toggle:active { transform: translateY(0); }

.langsynC-globe { font-size: 18px; line-height: 1; }

.langsynC-current-lang {
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Dropdown — uses custom colors */
.langsynC-switcher-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--langsynC-dropdown-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 2px 10px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.25s ease;
    padding: 6px;
}

.langsynC-pos-top-right .langsynC-switcher-dropdown,
.langsynC-pos-top-left .langsynC-switcher-dropdown {
    bottom: auto;
    top: calc(100% + 10px);
    transform: translateY(-10px);
}

.langsynC-pos-bottom-left .langsynC-switcher-dropdown,
.langsynC-pos-top-left .langsynC-switcher-dropdown {
    right: auto;
    left: 0;
}

.langsynC-switcher-inline .langsynC-switcher-dropdown {
    bottom: auto;
    top: calc(100% + 6px);
    transform: translateY(-10px);
}

/* Open state */
.langsynC-switcher.open .langsynC-switcher-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Language Options */
.langsynC-lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--langsynC-dropdown-text, #333);
    font-size: 14px;
    transition: background 0.15s;
}

.langsynC-lang-option:hover {
    background: var(--langsynC-active-bg, #f5f3ff);
    text-decoration: none;
}

.langsynC-lang-option.langsynC-lang-active {
    background: var(--langsynC-active-bg, #f0eefa);
    font-weight: 600;
}

.langsynC-lang-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.langsynC-lang-code {
    font-size: 11px;
    color: #aaa;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.langsynC-lang-check {
    font-weight: bold;
    font-size: 14px;
}

/* Scrollbar */
.langsynC-switcher-dropdown::-webkit-scrollbar { width: 5px; }
.langsynC-switcher-dropdown::-webkit-scrollbar-track { background: transparent; }
.langsynC-switcher-dropdown::-webkit-scrollbar-thumb { background: #ddd; border-radius: 10px; }

/* Responsive */
@media (max-width: 480px) {
    .langsynC-switcher-floating {
        bottom: 16px !important;
        right: 16px !important;
        left: auto !important;
        top: auto !important;
    }
    .langsynC-switcher-dropdown { min-width: 200px; max-height: 260px; }
    .langsynC-switcher-toggle { padding: 8px 14px; font-size: 13px; }
}
