/**
 * Language selector (master switch) — DROPDOWN variant.
 * >=44px target, no !important, no inline styles. Themed with fleet --as-*
 * tokens where available, with safe fallbacks.
 */

.aphasia-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border: 1px solid var(--as-border, #d4d9e0);
    border-radius: 999px;
    background: var(--as-surface, #ffffff);
    font-family: inherit;
    line-height: 1;
}

.aphasia-lang-switch__label {
    display: inline-flex;
    align-items: center;
    padding-left: 6px;
}

.aphasia-lang-switch__globe {
    font-size: 18px;
}

.aphasia-lang-switch__select {
    min-height: 44px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--as-border, #d4d9e0);
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: var(--as-text, #1f2a37);
    background-color: var(--as-surface, #ffffff);
    /* Custom caret (inline SVG data-URI, no external request) so the control
       reads consistently across browsers. */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%3E%3Cpath%20fill='%231f2a37'%20d='M5.5%207.5L10%2012l4.5-4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px 18px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
}

.aphasia-lang-switch__select:focus-visible {
    outline: 3px solid var(--as-focus, #1e3a8a);
    outline-offset: 2px;
}

.aphasia-lang-switch__go {
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--as-primary, #1aa0c4);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--as-primary, #1aa0c4);
    cursor: pointer;
}

/* ── Page-top bar (Home + Practice Hub, rendered at wp_body_open) ── */
.aphasia-lang-bar {
    display: flex;
    justify-content: center;
    padding: 8px 12px;
    background: var(--as-surface-alt, #f4f7fb);
    border-bottom: 1px solid var(--as-border, #e2e7ee);
}

/* Visually-hidden but screen-reader-available (matches WP core .screen-reader-text). */
.aphasia-lang-switch .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 380px) {
    .aphasia-lang-switch__select {
        font-size: 15px;
        padding: 0 30px 0 12px;
    }
}
