/* ============================================
   EN ↔ VI Translator – frontend styles
   ============================================ */

/* ── Wrapper ── */
.envit-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1;
}

/* ── Buttons style ── */
.envit-style-buttons .envit-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 2px solid transparent;
    border-radius: 20px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .3px;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    text-decoration: none;
}

.envit-style-buttons .envit-btn:hover {
    background: rgba(0,0,0,.07);
}

.envit-style-buttons .envit-btn.envit-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Dark background support */
.has-dark-background .envit-style-buttons .envit-btn.envit-active,
.site-header-dark .envit-style-buttons .envit-btn.envit-active {
    background: #fff;
    border-color: #fff;
    color: #0073aa;
}

.envit-style-buttons .envit-divider {
    color: #ccc;
    font-weight: 300;
    user-select: none;
}

/* ── Dropdown style ── */
.envit-style-dropdown {
    gap: 4px;
}

.envit-style-dropdown .envit-select-label {
    font-size: 16px;
    cursor: default;
}

.envit-style-dropdown .envit-select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    appearance: auto;
    max-width: 160px;
}

.envit-style-dropdown .envit-select:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}

/* ── Hide Google's default UI chrome ── */
.goog-te-banner-frame,
.goog-te-balloon-frame,
body > .skiptranslate {
    display: none !important;
}

body {
    top: 0 !important;
}

.goog-te-gadget {
    font-size: 0 !important;
}

/* ── Screen reader only ── */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ── Auto-inject floating bar ── */
.envit-auto-inject {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    background: #fff;
    padding: 8px 12px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

@media (max-width: 480px) {
    .envit-auto-inject {
        bottom: 12px;
        right: 12px;
    }
    .envit-style-buttons .envit-label {
        display: none;
    }
    .envit-style-buttons .envit-btn {
        padding: 6px 9px;
    }
}
