﻿/* ================================================================
   WIDGET MODAL CENTRADO — encuesta-flotante.css
   ================================================================ */

/* ── BOTÓN TRIGGER ───────────────────────────────────────────── */
.enc-float-trigger {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #244B5C;
    color: #ffffff;
    padding: 11px 18px 11px 14px;
    border-radius: 50px;
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(36, 75, 92, 0.35);
    transition: transform 0.15s, opacity 0.15s;
}

    .enc-float-trigger:hover {
        transform: translateY(-2px);
        opacity: 0.92;
    }

    .enc-float-trigger.oculto {
        display: none;
    }

.enc-trigger-dot {
    width: 8px;
    height: 8px;
    background: #3A989A;
    border-radius: 50%;
    flex-shrink: 0;
    animation: encFloatPulse 1.8s infinite;
}

@keyframes encFloatPulse {
    0%,100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(.8);
    }
}

/* ── OVERLAY ─────────────────────────────────────────────────── */
.enc-float-overlay {
    position: fixed;
    inset: 0;
    z-index: 9100;
    background: rgba(20, 38, 46, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

    .enc-float-overlay.visible {
        opacity: 1;
        pointer-events: all;
    }

    .enc-float-overlay.oculto {
        display: none;
    }

/* ── PANEL MODAL ─────────────────────────────────────────────── */
.enc-float-panel {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(20, 38, 46, 0.25);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.enc-float-overlay.visible .enc-float-panel {
    transform: translateY(0) scale(1);
}

/* ── HEADER ──────────────────────────────────────────────────── */
.enc-float-header {
    background: #244B5C;
    padding: 20px 20px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.enc-float-header-left {
    flex: 1;
}

.enc-float-semana {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.enc-float-semana-dot {
    width: 5px;
    height: 5px;
    background: #3A989A;
    border-radius: 50%;
    animation: encFloatPulse 1.8s infinite;
}

.enc-float-pregunta {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
}

.enc-float-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.65);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
    font-family: inherit;
    line-height: 1;
}

    .enc-float-close:hover {
        background: rgba(255,255,255,0.2);
    }

/* ── BODY ────────────────────────────────────────────────────── */
.enc-float-body {
    padding: 18px 20px 20px;
}

.enc-float-opciones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.enc-float-opcion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(36, 75, 92, 0.10);
    border-radius: 12px;
    background: rgba(36, 75, 92, 0.02);
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: #244B5C;
    font-family: inherit;
    transition: border-color 0.14s, background 0.14s;
    width: 100%;
}

    .enc-float-opcion:hover {
        border-color: rgba(58,152,154,0.4);
        background: rgba(58,152,154,0.04);
    }

    .enc-float-opcion.activo {
        border: 1.5px solid #3A989A;
        background: rgba(58,152,154,0.07);
    }

.enc-float-op-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* ── BOTÓN VOTAR ─────────────────────────────────────────────── */
.enc-float-btn-votar {
    width: 100%;
    padding: 13px;
    background: #244B5C;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

    .enc-float-btn-votar:disabled {
        opacity: 0.22;
        cursor: not-allowed;
    }

    .enc-float-btn-votar:hover:not(:disabled) {
        opacity: 0.85;
    }

/* ── GRACIAS ─────────────────────────────────────────────────── */
.enc-float-gracias {
    padding: 28px 20px 24px;
    text-align: center;
}

.enc-float-gracias-icon {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
}

.enc-float-gracias-titulo {
    font-size: 16px;
    font-weight: 700;
    color: #244B5C;
    margin-bottom: 5px;
}

.enc-float-gracias-sub {
    font-size: 13px;
    color: rgba(36,75,92,0.5);
    margin-bottom: 18px;
    line-height: 1.5;
}

.enc-float-link-res {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #3A989A;
    border: 1px solid rgba(58,152,154,0.28);
    padding: 9px 18px;
    border-radius: 10px;
    background: rgba(58,152,154,0.06);
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

    .enc-float-link-res:hover {
        background: rgba(58,152,154,0.13);
    }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 480px) {
    .enc-float-trigger {
        right: 14px;
        bottom: 14px;
        font-size: 12px;
        padding: 10px 14px 10px 12px;
    }

    .enc-float-overlay {
        padding: 14px;
        align-items: flex-end;
    }

    .enc-float-panel {
        border-radius: 20px 20px 16px 16px;
    }
}

/* ── PROGRESS DOTS ───────────────────────────────────────────── */
.enc-float-progress {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: rgba(36,75,92,0.03);
    border-bottom: 1px solid rgba(36,75,92,0.06);
}

.enc-float-prog-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(36,75,92,0.15);
    transition: background 0.2s, transform 0.2s;
}

    .enc-float-prog-dot.done {
        background: #3A989A;
    }

    .enc-float-prog-dot.active {
        background: #244B5C;
        transform: scale(1.25);
    }

.enc-float-prog-txt {
    font-size: 11px;
    color: rgba(36,75,92,0.4);
    font-weight: 600;
    margin-left: 4px;
}

/* ── BOTONES GRACIAS ─────────────────────────────────────────── */
.enc-float-gracias-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.enc-float-btn-sig {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: #244B5C;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
    width: 100%;
    justify-content: center;
}

    .enc-float-btn-sig:hover {
        opacity: 0.85;
    }

/* ── 6 OPCIONES EN MODAL: compactas ─────────────────────────── */
.enc-float-opciones:has(.enc-float-opcion:nth-child(5)) .enc-float-opcion,
.enc-float-opciones:has(.enc-float-opcion:nth-child(6)) .enc-float-opcion {
    padding: 8px 12px;
    font-size: 12px;
}

.enc-float-opciones:has(.enc-float-opcion:nth-child(5)) .enc-float-op-icon,
.enc-float-opciones:has(.enc-float-opcion:nth-child(6)) .enc-float-op-icon {
    font-size: 14px;
    width: 18px;
}

.enc-float-opciones:has(.enc-float-opcion:nth-child(5)),
.enc-float-opciones:has(.enc-float-opcion:nth-child(6)) {
    gap: 5px;
}
/* Modal más alto cuando hay 6 opciones */
.enc-float-panel {
    max-height: 90vh;
    overflow-y: auto;
}
