/* =========================================================
   Security Threat Explorer Widget
   Section 9.02
   ========================================================= */

.security-threat-widget {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(230, 0, 79, 0.08), transparent 34%),
        linear-gradient(135deg, #f8fafc, #ffffff);
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.sth-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.sth-option {
    border: 1px solid #cbd5e1;
    background: white;
    color: #334155;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sth-option:hover,
.sth-option.active {
    background: #0f172a;
    border-color: #0f172a;
    color: white;
    transform: translateY(-1px);
}

.sth-stage {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 0.8rem;
    align-items: stretch;
}

.sth-card {
    min-height: 150px;
    padding: 1rem;
    border-radius: 22px;
    background: white;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.sth-card strong {
    display: block;
    margin: 0.4rem 0;
    color: #0f172a;
    font-size: 1.2rem;
}

.sth-card p {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.sth-label {
    display: inline-flex;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(91, 95, 168, 0.12);
    color: #4b4f9c;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sth-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e6004f;
    font-size: 2rem;
    font-weight: 900;
}

.sth-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 1rem;
}

.sth-mini-card {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.sth-mini-card strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #0f172a;
}

.sth-mini-card span {
    color: #475569;
    line-height: 1.45;
}

.reveal .security-threat-widget {
    font-size: 0.78em;
    margin-top: 0.8rem;
}

.reveal .sth-stage {
    gap: 0.55rem;
}

.reveal .sth-card {
    min-height: 120px;
    padding: 0.8rem;
}

.reveal .sth-card strong {
    font-size: 1rem;
}

.reveal .sth-card p,
.reveal .sth-mini-card span {
    font-size: 0.82rem;
}

@media (max-width: 780px) {
    .sth-stage {
        grid-template-columns: 1fr;
    }

    .sth-arrow {
        transform: rotate(90deg);
        min-height: 24px;
    }

    .sth-info-grid {
        grid-template-columns: 1fr;
    }
}
