/* Overlay global de cuenta atrás del análisis.
   Arranca en la página de origen (tendencias/resultados) al pulsar Analizar y
   sobrevive a la navegación: en destino se reconstruye leyendo el timestamp de
   sessionStorage, de modo que la cuenta es continua mientras la página de análisis
   carga por debajo del blur. Reutiliza la estética de .autostart-* */

.acd-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(6, 20, 16, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.acd-box {
    background: linear-gradient(160deg, #0e2a22, #0a1f1a);
    border: 1px solid rgba(16, 185, 129, 0.35);
    border-radius: 20px;
    padding: 36px 40px 32px;
    max-width: 440px;
    width: calc(100% - 48px);
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    animation: acd-pop 0.25s ease;
}

@keyframes acd-pop {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.acd-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 22px; }
.acd-ring svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.acd-ring-bg { stroke: rgba(255, 255, 255, 0.08); stroke-width: 7; }
.acd-ring-fg {
    stroke: #10b981;
    stroke-width: 7;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s linear;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.6));
}
/* Modo spinner: cuando la cuenta atrás acaba pero el análisis aún no está listo.
   El SVG gira y el arco verde se fija a ~25% del círculo → spinner indeterminado. */
.acd-ring.acd-ring-spin svg { animation: acd-spin 0.9s linear infinite; }
.acd-ring.acd-ring-spin .acd-ring-fg {
    stroke-dasharray: 85 255;     /* ~25% de la circunferencia (2πR≈339) visible */
    stroke-dashoffset: 0;
    transition: none;
}
@keyframes acd-spin { to { transform: rotate(270deg); } }
.acd-count {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.acd-title { font-size: 1.35rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.acd-msg { font-size: 0.95rem; color: #aebfb8; line-height: 1.5; margin-bottom: 24px; }

.acd-cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #e8f3ee;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 11px 26px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.acd-cancel:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
}
