.cepi-popup {
    --cepi-popup-ancho: 560px;
    width: min(var(--cepi-popup-ancho), calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #1e1e1e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: auto;
}

.cepi-popup[open] {
    animation: cepi-popup-entrar 0.25s ease-out;
}

.cepi-popup::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.cepi-popup__imagen {
    display: block;
    width: 100%;
    height: auto;
}

.cepi-popup__cuerpo {
    padding: 24px 28px 28px;
}

.cepi-popup__titulo {
    margin: 0 32px 12px 0;
    font-size: 1.5rem;
    line-height: 1.25;
}

.cepi-popup__mensaje > :first-child { margin-top: 0; }
.cepi-popup__mensaje > :last-child { margin-bottom: 0; }

.cepi-popup__acciones {
    margin: 20px 0 0;
    text-align: center;
}

.cepi-popup__boton {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    background: #0b3c7a;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none !important;
}

.cepi-popup__boton:hover,
.cepi-popup__boton:focus-visible {
    background: #072a57;
}

.cepi-popup__cerrar {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #1e1e1e;
    font-size: 28px;
    line-height: 40px;
    cursor: pointer;
}

.cepi-popup__cerrar:hover {
    background: #fff;
}

.cepi-popup__cerrar:focus-visible,
.cepi-popup__boton:focus-visible {
    outline: 3px solid #f2b705;
    outline-offset: 2px;
}

@keyframes cepi-popup-entrar {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .cepi-popup[open] { animation: none; }
}
