/* Selector de idiomas - Estilos base */
.language-selector-wrapper {
    position: relative;
    z-index: 10000;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.language-flag-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-flag-btn svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    stroke: #ffffff;
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    min-width: 220px;
    z-index: 10001;
    overflow: visible;
}

.language-dropdown.active {
    display: block;
}

.language-dropdown-header {
    padding: 12px 15px;
    background: #487790;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 8px 8px 0 0;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    background: #fff;
    width: 100%;
    text-align: left;
    font-size: 14px;
    color: #333;
}

.language-option:hover {
    background: #f0f0f0;
}

.language-option.active {
    background: #e3f2fd;
}

.language-option:last-child {
    border-radius: 0 0 8px 8px;
}

.language-option img {
    width: 28px;
    height: 20px;
    min-width: 28px;
    margin-right: 12px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.language-option span {
    flex: 1;
    white-space: nowrap;
}

#google_translate_element {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0.01;
    overflow: hidden;
    z-index: -1;
}

.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

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

.VIpgJd-ZVi9od-ORHb-OEVmcd {
    display: none !important;
}

.skiptranslate {
    display: none !important;
    height: 0 !important;
}

iframe.goog-te-menu-frame {
    box-shadow: none !important;
}

/* ── Separador visual entre idiomas Polylang y auto-translate ── */
.language-option[data-auto-translate="true"]:first-of-type {
    border-top: 1px solid #eee;
    margin-top: 4px;
}

/* Indicador sutil en opciones auto-translate */
.language-option[data-auto-translate="true"]::after {
    content: "auto";
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 1px 4px;
    margin-left: 6px;
    opacity: 0.7;
}

/* ── Toast de traducción automática ── */
.auto-translate-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: #fff;
    padding: 12px 16px 12px 14px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
    max-width: 420px;
    width: calc(100% - 40px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.auto-translate-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.auto-translate-toast svg {
    color: #f0b429;
    flex-shrink: 0;
}

.auto-translate-toast span {
    flex: 1;
}

.auto-translate-toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 0 0 6px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.auto-translate-toast-close:hover {
    color: #fff;
}

@media (max-width: 480px) {
    .auto-translate-toast {
        bottom: 16px;
        font-size: 12px;
    }
}
