/* ABC3 Google Translate: module-scoped switcher UI */
.abc3-gootrans {
    --abc3-gootrans-primary: #2196f3;
    --abc3-gootrans-primary-dark: #1976d2;
    --abc3-gootrans-panel-width: 360px;
    position: relative;
    z-index: 11040;
}

.abc3-gootrans__trigger {
    position: fixed;
    top: 76px;
    right: 0;
    z-index: 11042;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    background: var(--abc3-gootrans-primary);
    border: 0;
    border-radius: 4px 0 0 4px;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.24);
    cursor: pointer;
    transition: width 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.abc3-gootrans__trigger:hover,
.abc3-gootrans__trigger:focus {
    width: 54px;
    color: #fff;
    background: var(--abc3-gootrans-primary-dark);
    outline: 0;
}

.abc3-gootrans__trigger:focus-visible,
.abc3-gootrans__close:focus-visible,
.abc3-gootrans__language:focus-visible,
.abc3-gootrans__search:focus-visible {
    outline: 2px solid var(--abc3-gootrans-primary);
    outline-offset: 2px;
}

.abc3-gootrans__panel {
    position: fixed;
    top: 68px;
    right: 12px;
    z-index: 11044;
    display: flex;
    flex-direction: column;
    width: min(var(--abc3-gootrans-panel-width), calc(100vw - 24px));
    max-height: calc(100vh - 80px);
    overflow: hidden;
    color: #333;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate3d(0, -18px, 0) scale(0.985);
    transform-origin: top right;
    transition: opacity 180ms ease, transform 220ms ease, visibility 0s linear 220ms;
}

.abc3-gootrans.is-open .abc3-gootrans__panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0) scale(1);
    transition-delay: 0s;
}

.abc3-gootrans.is-open .abc3-gootrans__trigger {
    opacity: 0;
    pointer-events: none;
}

.abc3-gootrans__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 12px 14px;
    border-bottom: 1px solid #e8e8e8;
}

.abc3-gootrans__header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.abc3-gootrans__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #777;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
}

.abc3-gootrans__close:hover,
.abc3-gootrans__close:focus {
    color: #222;
    background: #f2f2f2;
}

.abc3-gootrans__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 14px;
}

.abc3-gootrans__search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.abc3-gootrans__search-wrap {
    position: relative;
    margin-bottom: 10px;
}

.abc3-gootrans__search-wrap > .fa {
    position: absolute;
    top: 50%;
    left: 12px;
    color: #888;
    pointer-events: none;
    transform: translateY(-50%);
}

.abc3-gootrans__search {
    width: 100%;
    height: 40px;
    padding: 8px 12px 8px 36px;
    color: #333;
    font-size: 14px;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    box-shadow: none;
}

.abc3-gootrans__search:focus {
    border-color: var(--abc3-gootrans-primary);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.12);
}

.abc3-gootrans__reset,
.abc3-gootrans__language {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    color: #454545;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
    background: #f8f9fa;
    border: 1px solid #e5e7e9;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.abc3-gootrans__language + .abc3-gootrans__language {
    margin-top: 6px;
}

.abc3-gootrans__language:hover,
.abc3-gootrans__language:focus {
    color: #222;
    background: #eaf5fe;
    border-color: #90caf9;
    outline: 0;
}

.abc3-gootrans__language.is-active {
    color: #0d5f9e;
    font-weight: 700;
    background: #e3f2fd;
    border-color: #64b5f6;
}

.abc3-gootrans__language-code {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 24px;
    margin-right: 10px;
    padding: 0 6px;
    color: #666;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.abc3-gootrans__language-name {
    flex: 1 1 auto;
    min-width: 0;
}

.abc3-gootrans__language-check {
    flex: 0 0 auto;
    margin-left: 8px;
    color: var(--abc3-gootrans-primary-dark);
    visibility: hidden;
}

.abc3-gootrans__language.is-active .abc3-gootrans__language-check {
    visibility: visible;
}

.abc3-gootrans__reset {
    margin-bottom: 10px;
    color: #b42318;
    font-weight: 700;
    background: #fff5f4;
    border-color: #ffd6d2;
}

.abc3-gootrans__reset > .fa {
    width: 38px;
    margin-right: 10px;
    text-align: center;
}

.abc3-gootrans__reset:hover,
.abc3-gootrans__reset:focus {
    color: #8f1910;
    background: #ffe9e6;
    border-color: #ffb4ad;
}

.abc3-gootrans__status {
    padding: 14px 8px;
    color: #777;
    font-size: 13px;
    line-height: 1.45;
    text-align: center;
}

.abc3-gootrans__status.is-error {
    color: #b42318;
    background: #fff5f4;
    border: 1px solid #ffd6d2;
    border-radius: 4px;
}

.abc3-gootrans__languages {
    min-height: 0;
    max-height: min(58vh, 520px);
    padding-right: 3px;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.abc3-gootrans__overlay {
    position: fixed;
    inset: 0;
    z-index: 11043;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    background: rgba(0, 0, 0, 0.34);
    border: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    cursor: default;
    transition: opacity 180ms ease, visibility 0s linear 180ms;
}

.abc3-gootrans.is-open .abc3-gootrans__overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

/* Keep Google's native control available to its own script but outside the viewport. */
.abc3-gootrans__google-widget {
    position: fixed !important;
    top: -10000px !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Google injects a page banner and a body offset; the ABC3 panel replaces both. */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.VIpgJd-ZVi9od-ORHb,
.VIpgJd-ZVi9od-ORHb iframe,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

html body {
    top: 0 !important;
}

.goog-text-highlight {
    background: transparent !important;
    box-shadow: none !important;
}

@media (max-width: 767px) {
    .abc3-gootrans__trigger {
        top: 62px;
        right: 8px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
    }

    .abc3-gootrans__trigger:hover,
    .abc3-gootrans__trigger:focus {
        width: 44px;
    }

    .abc3-gootrans__panel {
        top: 58px;
        right: 8px;
        width: calc(100vw - 16px);
        max-height: calc(100vh - 66px);
    }

    .abc3-gootrans__languages {
        max-height: calc(100vh - 270px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .abc3-gootrans__trigger,
    .abc3-gootrans__panel,
    .abc3-gootrans__overlay {
        transition: none;
    }
}
