#ah-en-switcher {
    --ah-en-forest: #194c3d;
    --ah-en-ink: #1b3029;
    --ah-en-line: #d9e5de;
    position: fixed;
    left: calc(16px + env(safe-area-inset-left, 0px));
    right: auto;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    top: auto;
    z-index: 9998;
    width: max-content;
    max-width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    color: var(--ah-en-ink);
    font: 500 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    text-transform: none;
    direction: ltr;
    text-align: left;
    isolation: isolate;
}

#ah-en-switcher,
#ah-en-switcher * {
    box-sizing: border-box;
}

#ah-en-switcher button {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    font: inherit;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    min-height: 44px;
    line-height: 1.35;
    box-shadow: none;
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

#ah-en-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-width: 132px;
    max-width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--ah-en-line);
    border-radius: 12px;
    background: #fff;
    color: var(--ah-en-forest);
    box-shadow: 0 4px 20px rgb(16 45 33 / 13%) !important;
}

#ah-en-toggle::after {
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    margin: 3px 1px 0 0;
    border-top: 1.5px solid currentColor;
    border-left: 1.5px solid currentColor;
    transform: rotate(45deg);
    flex: 0 0 auto;
}

#ah-en-toggle[aria-expanded="true"]::after {
    margin-top: -3px;
    transform: rotate(225deg);
}

#ah-en-toggle:hover,
#ah-en-toggle[aria-expanded="true"] {
    background: #f1f6f3;
    color: var(--ah-en-forest);
    border-color: #b7cec1;
}

#ah-en-options {
    position: absolute;
    left: 0;
    right: auto;
    bottom: calc(100% + 8px);
    top: auto;
    display: grid;
    gap: 3px;
    width: max-content;
    min-width: 184px;
    max-width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    padding: 6px;
    border: 1px solid var(--ah-en-line);
    border-radius: 14px;
    background: #fff;
    color: var(--ah-en-ink);
    box-shadow: 0 8px 28px rgb(16 45 33 / 16%);
}

#ah-en-options[hidden] {
    display: none !important;
}

#ah-en-options [data-ah-en-language] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    width: 100%;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--ah-en-ink);
    text-align: left;
}

#ah-en-options [data-ah-en-language]:hover {
    background: #f1f6f3;
    color: var(--ah-en-forest);
}

#ah-en-options [data-ah-en-language][aria-pressed="true"] {
    background: #eaf2ed;
    color: var(--ah-en-forest);
    font-weight: 650;
}

#ah-en-options [data-ah-en-language][aria-pressed="true"]::after {
    content: "✓";
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

#ah-en-switcher button:focus-visible {
    outline: 3px solid #698c7c;
    outline-offset: 3px;
}

#ah-en-switcher .ah-en-preview-label {
    display: block;
    margin: 6px 0 0;
    padding: 3px 7px;
    border-radius: 5px;
    background: #fff6db;
    color: #6d4d0d;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    max-width: 190px;
}

@media (max-width: 480px) {
    #ah-en-switcher {
        left: calc(12px + env(safe-area-inset-left, 0px));
        right: auto;
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        max-width: calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
        font-size: 13px;
    }

    #ah-en-toggle {
        min-width: 116px;
        padding: 11px 13px;
        border-radius: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ah-en-switcher button {
        transition: none;
    }
}

@media print {
    #ah-en-switcher {
        display: none !important;
    }
}
