/* ── Clean Translator v2 ────────────────────────────────────────────────────
   All Google-injected UI is hidden via PHP (wp_head) + JS (MutationObserver).
   Only our custom switcher is styled here.
   ─────────────────────────────────────────────────────────────────────────── */

/* Safety net — hide Google's UI from CSS too */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-text-highlight,
iframe.goog-te-menu-frame,
.skiptranslate { display: none !important; visibility: hidden !important; }
body            { top: 0 !important; }

/* ── Wrapper ────────────────────────────────────────────────────────────── */
.ct-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1;
}

/* ── Dropdown style ─────────────────────────────────────────────────────── */
.ct-style-dropdown #ct-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M0 0l6 8 6-8z' fill='%23667085'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 7px 32px 7px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #344054;
    cursor: pointer;
    outline: none;
    min-width: 155px;
    transition: border-color .15s, box-shadow .15s;
}
.ct-style-dropdown #ct-select:hover {
    border-color: #98a2b3;
}
.ct-style-dropdown #ct-select:focus {
    border-color: #667085;
    box-shadow: 0 0 0 3px rgba(102,112,133,.15);
}

/* ── Flag-button style ──────────────────────────────────────────────────── */
.ct-style-flags {
    flex-wrap: wrap;
    gap: 4px;
}
.ct-lang-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: border-color .15s, transform .1s, background .15s;
}
.ct-lang-btn:hover {
    border-color: #d0d5dd;
    transform: scale(1.15);
}
.ct-lang-btn.ct-active {
    border-color: #667085;
    background: #f2f4f7;
}
.ct-restore-btn {
    font-size: 16px;
    color: #667085;
    padding: 4px 8px;
}
.ct-restore-btn:hover {
    background: #f2f4f7;
    border-color: #d0d5dd;
}

/* ── Floating position ──────────────────────────────────────────────────── */
.ct-floating {
    position: fixed !important;
    bottom: 24px;
    z-index: 999999;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.06);
}
.ct-floating-right { right: 24px; }
.ct-floating-left  { left: 24px;  }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ct-floating {
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }
    .ct-floating-right { right: 12px; }
    .ct-floating-left  { left: 12px;  }
    .ct-style-flags .ct-lang-btn { font-size: 16px; }
    .ct-style-dropdown #ct-select { min-width: 130px; font-size: 13px; }
}
