/* ============================================================
   SELECTION EMPHASIS — Pasos 2 & 3
   Aumenta el énfasis visual del estado seleccionado en
   .card-option.selected usando selectores de mayor especificidad
   y clases nuevas. NO modifica reglas existentes de main.css,
   enhancements-tier1.css ni enhancements-tier2.css.
   ============================================================ */

/* ── Keyframes nuevos ── */
@keyframes sel-pop {
    0%   { transform: scale(0.96); }
    60%  { transform: scale(1.035); }
    100% { transform: scale(1.02); }
}

@keyframes sel-glow-pulse {
    0%, 100% {
        box-shadow:
            0 0 0 2px rgba(30, 98, 236, 0.70),
            0 0 18px rgba(30, 98, 236, 0.45),
            0 6px 24px rgba(0, 0, 0, 0.40);
    }
    50% {
        box-shadow:
            0 0 0 2px rgba(79, 172, 254, 0.85),
            0 0 32px rgba(30, 98, 236, 0.65),
            0 8px 30px rgba(0, 0, 0, 0.45);
    }
}

@keyframes sel-check-in {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    70%  { transform: scale(1.2) rotate(5deg);  opacity: 1; }
    100% { transform: scale(1)   rotate(0deg);  opacity: 1; }
}

@keyframes sel-bar-grow {
    from { width: 0; }
}

/* ── Estado seleccionado: amplificado ── */
label.card-option.selected,
.card-option.selected {
    /* Fondo: degradado sutil azul */
    background: linear-gradient(
        135deg,
        rgba(30, 98, 236, 0.18) 0%,
        rgba(10, 30, 90, 0.55) 100%
    ) !important;

    /* Borde más grueso y brillante */
    border: 2px solid rgba(79, 172, 254, 0.85) !important;

    /* Glow pulsante */
    animation: sel-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               sel-glow-pulse 2.8s ease-in-out 0.3s infinite !important;

    /* Elevación */
    transform: scale(1.02) !important;

    /* Posicionamiento para pseudo-elementos */
    position: relative !important;
    overflow: hidden !important;
}

/* Barra de acento inferior */
label.card-option.selected::before,
.card-option.selected::before {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: linear-gradient(90deg, #1e62ec, #4facfe, #1e62ec) !important;
    background-size: 200% 100% !important;
    animation: sel-bar-grow 0.35s ease-out forwards !important;
    border-radius: 0 0 10px 10px !important;
    z-index: 2 !important;
    /* Desactivar el shimmer-sweep del tier1 en este pseudo */
    opacity: 1 !important;
}

/* Checkmark badge en esquina superior derecha */
label.card-option.selected::after,
.card-option.selected::after {
    content: '✓' !important;
    position: absolute !important;
    top: 8px !important;
    right: 10px !important;
    width: 22px !important;
    height: 22px !important;
    background: linear-gradient(135deg, #1e62ec, #4facfe) !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 22px !important;
    text-align: center !important;
    border-radius: 50% !important;
    box-shadow: 0 0 10px rgba(30, 98, 236, 0.6) !important;
    animation: sel-check-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    z-index: 3 !important;
    /* Resetear el shimmer que tier1 puso en ::after */
    left: auto !important;
    top: 8px !important;
}

/* ── Ícono del card: más vivaz cuando está seleccionado ── */
label.card-option.selected .card-option-icon,
.card-option.selected .card-option-icon {
    background: linear-gradient(
        135deg,
        rgba(30, 98, 236, 0.45),
        rgba(79, 172, 254, 0.25)
    ) !important;
    border-color: rgba(79, 172, 254, 0.65) !important;
    box-shadow: 0 0 20px rgba(30, 98, 236, 0.55) !important;
    color: #ffffff !important;
    transform: scale(1.12) !important;
}

label.card-option.selected .card-option-icon i,
.card-option.selected .card-option-icon i {
    color: #ffffff !important;
    text-shadow: 0 0 12px rgba(79, 172, 254, 0.8) !important;
}

/* ── Texto principal: blanco puro y más bold ── */
label.card-option.selected .option-title,
.card-option.selected .option-title {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 8px rgba(79, 172, 254, 0.35) !important;
}

/* ── Subtexto: más visible ── */
label.card-option.selected .option-desc,
.card-option.selected .option-desc {
    color: rgba(180, 210, 255, 0.85) !important;
}

/* ── card-option-text (step3 no tiene icon, solo texto) ── */
label.card-option.selected .card-option-text,
.card-option.selected .card-option-text {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 0 8px rgba(79, 172, 254, 0.25) !important;
}

/* ── card-option-circle mejorado (step3) ── */
label.card-option.selected .card-option-circle,
.card-option.selected .card-option-circle {
    border-color: #4facfe !important;
    background: rgba(30, 98, 236, 0.20) !important;
    box-shadow: 0 0 10px rgba(30, 98, 236, 0.5) !important;
    transform: scale(1.15) !important;
}

/* ── Opciones NO seleccionadas: atenuadas levemente para dar contraste ── */
.card-option:not(.selected) {
    opacity: 0.72;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Recuperan opacidad completa en hover */
.card-option:not(.selected):hover {
    opacity: 1;
}

/* Si no hay ninguna seleccionada aún: todos a opacidad completa */
.row:not(:has(.card-option.selected)) .card-option {
    opacity: 1;
}

/* ── Accesibilidad: reducir movimiento ── */
@media (prefers-reduced-motion: reduce) {
    label.card-option.selected,
    .card-option.selected {
        animation: none !important;
        transform: scale(1.01) !important;
    }

    label.card-option.selected::after,
    .card-option.selected::after {
        animation: none !important;
    }
}

/* ── Responsive: en móvil reducir la escala ── */
@media (max-width: 576px) {
    label.card-option.selected,
    .card-option.selected {
        transform: scale(1.01) !important;
    }
}
