/* WP Site Translator — Frontend Switcher Styles */

/* ── Floating switcher ─────────────────────────────────────── */
.wpst-switcher {
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
}

.wpst-switcher--bottom-right { position: fixed; bottom: 24px; right: 24px; }
.wpst-switcher--bottom-left  { position: fixed; bottom: 24px; left:  24px; }
.wpst-switcher--top-right    { position: fixed; top:    24px; right: 24px; }
.wpst-switcher--top-left     { position: fixed; top:    24px; left:  24px; }
.wpst-switcher--inline       { position: relative; display: inline-block; }

.wpst-switcher__inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* When floating — collapse to a globe icon, expand on hover */
.wpst-switcher--bottom-right .wpst-switcher__inner,
.wpst-switcher--bottom-left  .wpst-switcher__inner,
.wpst-switcher--top-right    .wpst-switcher__inner,
.wpst-switcher--top-left     .wpst-switcher__inner {
    max-height: 0;
    overflow: hidden;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height .25s, opacity .2s, padding .2s;
}

/* Globe toggle button */
.wpst-switcher--bottom-right::before,
.wpst-switcher--bottom-left::before,
.wpst-switcher--top-right::before,
.wpst-switcher--top-left::before {
    content: "🌐";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
    transition: transform .2s;
}
.wpst-switcher--bottom-left::before,
.wpst-switcher--top-left::before { margin-right: auto; }

.wpst-switcher:hover::before { transform: scale(1.08) rotate(15deg); }

.wpst-switcher:hover .wpst-switcher__inner {
    max-height: 360px;
    opacity: 1;
    padding: 8px;
    pointer-events: auto;
    margin-top: 8px;
}
.wpst-switcher--top-right:hover .wpst-switcher__inner,
.wpst-switcher--top-left:hover  .wpst-switcher__inner {
    margin-top: 0;
    margin-bottom: 8px;
    order: -1;
}

/* ── Language links ─────────────────────────────────────────── */
.wpst-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #1d2327;
    white-space: nowrap;
    transition: background .15s;
    min-width: 140px;
}
.wpst-lang:hover { background: #e8f0fe; color: #2271b1; text-decoration: none; }
.wpst-lang--active {
    background: #2271b1;
    color: #fff !important;
    font-weight: 600;
}
.wpst-lang--active:hover { background: #135e96; }

.wpst-flag { font-size: 1.2em; flex-shrink: 0; }
.wpst-lang-name { font-size: .875rem; }

/* ── Inline switcher ──────────────────────────────────────────── */
.wpst-switcher--inline .wpst-switcher__inner {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    overflow: visible;
    opacity: 1;
    pointer-events: auto;
    padding: 8px;
}
.wpst-switcher--inline .wpst-lang { min-width: auto; }

/* ── Scrollbar ──────────────────────────────────────────────── */
.wpst-switcher__inner::-webkit-scrollbar { width: 4px; }
.wpst-switcher__inner::-webkit-scrollbar-thumb { background: #c3c4c7; border-radius: 4px; }
