/* ========================================================
   1. BLOQUEO TOTAL DE GOOGLE BANNER Y EMPUJES DE PANTALLA
   ======================================================== */
html, body {
    top: 0px !important;
    position: static !important;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
    visibility: hidden !important;
    height: 0px !important;
    width: 0px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body > .skiptranslate {
    display: none !important;
}

.goog-text-highlight {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* ========================================================
   2. DISEÑO MODERNO (SAAS / GLASSMORPHISM) TRANSLATEFY
   ======================================================== */
.translatefy-wrapper {
    display: inline-block;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    z-index: 99999;
    box-sizing: border-box;
}

.translatefy-wrapper * {
    box-sizing: border-box;
}

/* Botón disparador */
.tf-modern-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--tf-bg, #ffffff);
    color: var(--tf-color, #0f172a);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 7px 14px;
    border-radius: var(--tf-radius, 10px);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tf-modern-trigger:hover {
    background: var(--tf-hover, #f8fafc);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
}

.tf-flag-badge {
    font-size: 17px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-current-label {
    letter-spacing: -0.2px;
}

.tf-chevron {
    transition: transform 0.25s ease;
    opacity: 0.6;
}

.translatefy-wrapper.is-open .tf-chevron {
    transform: rotate(180deg);
}

/* Menú Desplegable */
.tf-modern-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    background: var(--tf-bg, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: calc(var(--tf-radius, 10px) + 2px);
    box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.14), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
    z-index: 1000000;
    overflow: hidden;
    transform-origin: top right;
    animation: tfDropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.translatefy-wrapper.is-open .tf-modern-dropdown {
    display: block;
}

@keyframes tfDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tf-dropdown-inner {
    max-height: 270px;
    overflow-y: auto;
    padding: 6px;
}

/* Elementos de la lista */
.tf-dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    color: var(--tf-color, #0f172a);
    text-decoration: none !important;
    border-radius: calc(var(--tf-radius, 10px) - 3px);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tf-dropdown-item:hover {
    background: var(--tf-hover, #f8fafc);
    color: var(--tf-color, #0f172a);
}

.tf-item-flag {
    font-size: 16px;
    line-height: 1;
}

.tf-item-name {
    flex: 1;
    white-space: nowrap;
}

.tf-item-check {
    opacity: 0;
    color: #0ea5e9;
    display: flex;
    align-items: center;
    transition: opacity 0.15s;
}

.tf-dropdown-item.is-selected {
    background: rgba(14, 165, 233, 0.08);
}

.tf-dropdown-item.is-selected .tf-item-check {
    opacity: 1;
}

/* Modos flotantes */
.tf-floating {
    position: fixed !important;
}

.tf-pos-bottom-right { bottom: 24px; right: 24px; }
.tf-pos-bottom-left { bottom: 24px; left: 24px; }
.tf-pos-top-right { top: 24px; right: 24px; }
.tf-pos-top-left { top: 24px; left: 24px; }

.tf-pos-bottom-right .tf-modern-dropdown,
.tf-pos-bottom-left .tf-modern-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
    transform-origin: bottom right;
}