/* ==================================================
   POPUP HALLOWEEN - PICARDIAS
   ================================================== */

/* ----------------------------------------------
   CONTROL DE VISIBILIDAD
   El popup SOLO se activa si el <body> tiene
   la clase "halloween-enabled"
   ---------------------------------------------- */
body:not(.halloween-enabled) .halloween-popup,
body:not(.halloween-enabled) .halloween-overlay {
    display: none !important;
}

/* Overlay */
.halloween-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 20, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.halloween-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup principal */
.halloween-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
    z-index: 99999;
    width: 92%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.45s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 24px;
    background: linear-gradient(160deg, #1a0b2e 0%, #2d1b4e 50%, #1a0b2e 100%);
    box-shadow:
        0 0 0 2px rgba(255, 140, 0, 0.4),
        0 25px 60px -12px rgba(0, 0, 0, 0.6),
        0 0 80px rgba(255, 100, 0, 0.25);
}

.halloween-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Scrollbar personalizada */
.halloween-popup::-webkit-scrollbar { width: 6px; }
.halloween-popup::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.halloween-popup::-webkit-scrollbar-thumb {
    background: #ff8c00;
    border-radius: 10px;
}

/* Contenedor interno */
.halloween-container {
    position: relative;
    padding: 35px 28px 25px;
}

/* Botón cerrar */
.halloween-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #fff;
    z-index: 2;
}

.halloween-close:hover,
.halloween-close:focus {
    background: #ff8c00;
    transform: rotate(90deg) scale(1.1);
    outline: none;
    box-shadow: 0 0 15px rgba(255, 140, 0, 0.6);
}

/* Decoración superior */
.halloween-decoration {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
    font-size: 26px;
}

.halloween-decoration span {
    display: inline-block;
    animation: halloweenFloat 3s ease-in-out infinite;
}

.halloween-decoration span:nth-child(1) { animation-delay: 0s; }
.halloween-decoration span:nth-child(2) { animation-delay: 0.4s; }
.halloween-decoration span:nth-child(3) { animation-delay: 0.8s; }
.halloween-decoration span:nth-child(4) { animation-delay: 1.2s; }
.halloween-decoration span:nth-child(5) { animation-delay: 1.6s; }

@keyframes halloweenFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-8px) rotate(8deg); }
}

/* Contenido */
.halloween-content {
    text-align: center;
    color: #fff;
}

.halloween-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.2;
    background: linear-gradient(135deg, #ff8c00 0%, #ffcc00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 140, 0, 0.4);
}

.halloween-subtitle {
    font-size: 15px;
    color: #e0d5f5;
    margin-bottom: 20px;
}

.halloween-subtitle strong {
    color: #ffcc00;
}

/* Alerta de cupos */
.halloween-alert {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255, 60, 60, 0.15);
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    color: #ffb3b3;
    text-align: left;
}

.halloween-alert i {
    color: #ff5252;
    font-size: 18px;
    flex-shrink: 0;
    animation: halloweenPulse 1.5s ease-in-out infinite;
}

@keyframes halloweenPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.15); opacity: 0.7; }
}

/* Fechas más solicitadas */
.halloween-dates { margin-bottom: 20px; }

.halloween-dates-title {
    font-size: 13px;
    color: #c9b8e8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    font-weight: 600;
}

.halloween-dates-grid {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.halloween-date {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    color: #fff;
    padding: 7px 13px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.halloween-date:hover { transform: translateY(-3px) scale(1.05); }

/* Conteo regresivo */
.halloween-countdown-container {
    background: linear-gradient(135deg, rgba(45, 27, 78, 0.9) 0%, rgba(26, 11, 46, 0.9) 100%);
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 18px;
    padding: 20px 15px;
    margin-bottom: 20px;
    box-shadow: inset 0 0 30px rgba(255, 140, 0, 0.08);
}

.halloween-countdown-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffb366;
    margin-bottom: 6px;
    font-weight: 600;
}

.halloween-next-date {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.halloween-countdown {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.halloween-countdown-item {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 10px 8px;
    min-width: 62px;
    border: 1px solid rgba(255, 140, 0, 0.25);
    transition: all 0.3s ease;
}

.halloween-countdown-item:hover {
    background: rgba(255, 140, 0, 0.15);
    border-color: rgba(255, 140, 0, 0.5);
    transform: translateY(-2px);
}

.halloween-countdown-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    display: block;
    color: #ffcc00;
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
    font-variant-numeric: tabular-nums;
}

.halloween-countdown-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #c9b8e8;
    display: block;
}

/* Beneficios */
.halloween-benefits {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.halloween-benefit {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: #d5c8ec;
}

.halloween-benefit i { color: #4ade80; font-size: 14px; }

/* Botón WhatsApp */
.halloween-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    width: 100%;
    max-width: 320px;
    margin: 0 auto 14px;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    position: relative;
    overflow: hidden;
}

.halloween-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.halloween-button:hover::before { left: 100%; }

.halloween-button:hover,
.halloween-button:focus {
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
    outline: none;
    border-color: #fff;
}

.halloween-button i { font-size: 22px; }

/* Footer */
.halloween-footer {
    font-size: 13px;
    color: #ffb366;
    margin-bottom: 12px;
    font-weight: 600;
}

.halloween-footer i {
    color: #ff6b00;
    animation: halloweenPulse 1.5s ease-in-out infinite;
}

/* Checkbox "No mostrar hoy" */
.halloween-hide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.halloween-hide input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #ff8c00;
}

.halloween-hide label {
    font-size: 12.5px;
    color: #a99bc4;
    cursor: pointer;
    transition: color 0.3s ease;
}

.halloween-hide label:hover { color: #ff8c00; }

/* ==================================================
   RESPONSIVE
   ================================================== */
@media (max-width: 768px) {
    .halloween-container { padding: 30px 20px 22px; }
    .halloween-title { font-size: 25px; }
    .halloween-subtitle { font-size: 14px; }
    .halloween-countdown { gap: 7px; }
    .halloween-countdown-item { min-width: 55px; padding: 8px 6px; }
    .halloween-countdown-number { font-size: 24px; }
    .halloween-button { font-size: 15.5px; padding: 14px 26px; }
    .halloween-decoration { font-size: 22px; gap: 10px; }
    .halloween-benefits { gap: 10px; }
    .halloween-benefit { font-size: 11.5px; }
}

@media (max-width: 480px) {
    .halloween-popup { width: 95%; border-radius: 20px; }
    .halloween-container { padding: 28px 16px 20px; }
    .halloween-title { font-size: 22px; }
    .halloween-countdown-item { min-width: 48px; padding: 7px 5px; }
    .halloween-countdown-number { font-size: 20px; }
    .halloween-countdown-label { font-size: 9px; }
    .halloween-date { padding: 6px 10px; font-size: 11.5px; }
    .halloween-alert { font-size: 12px; padding: 10px 12px; }
    .halloween-benefits { flex-direction: column; gap: 6px; align-items: center; }
}

/* ==================================================
   ACCESIBILIDAD - Movimiento reducido
   ================================================== */
@media (prefers-reduced-motion: reduce) {
    .halloween-popup,
    .halloween-overlay,
    .halloween-close,
    .halloween-decoration span,
    .halloween-alert i,
    .halloween-footer i,
    .halloween-button::before {
        animation: none !important;
        transition: none !important;
    }
}