/*
 * Code Blue Security — Threat Feed Styles
 * Public-facing healthcare threat intelligence page
 */

/* ─── HERO ───────────────────────────────────────────────────── */
.threat-feed-page {
    padding-top: 80px;
}

.tf-hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
    border-bottom: 1px solid rgba(26,107,255,0.15);
}

.tf-hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,45,74,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,45,74,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.tf-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 80% at 30% 50%, rgba(255,45,74,0.08) 0%, transparent 70%);
}

.tf-hero-inner {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.tf-hero-title {
    font-family: var(--display);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 16px 0 20px;
}

.tf-hero-desc {
    font-size: 16px;
    line-height: 1.7;
    color: var(--white-dim);
    font-weight: 300;
    max-width: 560px;
}

/* Status panel */
.tf-status-panel {
    background: var(--navy-mid);
    border: 1px solid rgba(26,107,255,0.2);
    padding: 24px;
    position: relative;
}

.tf-status-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--blue));
}

.tf-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tf-status-row:last-of-type {
    border-bottom: none;
}

.tf-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tf-status-dot--live {
    background: #27c93f;
    box-shadow: 0 0 8px rgba(39,201,63,0.6);
    animation: tfPulse 2s ease-in-out infinite;
}

@keyframes tfPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.tf-status-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--white-dim);
    flex: 1;
}

.tf-status-value {
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
}

.tf-status-value--green { color: #27c93f; }
.tf-status-value--red   { color: var(--red); }

.tf-status-disclaimer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-family: var(--mono);
    font-size: 10px;
    line-height: 1.6;
    color: rgba(154,174,203,0.5);
    letter-spacing: 0.03em;
}

/* ─── TABS BAR ───────────────────────────────────────────────── */
.tf-tabs-bar {
    background: var(--navy-mid);
    border-bottom: 1px solid rgba(26,107,255,0.15);
    position: sticky;
    top: 68px;
    z-index: 50;
}

.tf-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tf-tabs::-webkit-scrollbar { display: none; }

.tf-tab {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 16px 28px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--white-dim);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tf-tab:hover {
    color: var(--white);
    background: rgba(26,107,255,0.05);
}

.tf-tab--active {
    color: var(--blue-bright);
    border-bottom-color: var(--blue-bright);
}

/* ─── MAIN LAYOUT ────────────────────────────────────────────── */
.tf-main {
    padding: 60px 0 100px;
}

/* ─── SECTION HEADERS ────────────────────────────────────────── */
.tf-section {
    margin-bottom: 80px;
}

.tf-section-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: end;
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(26,107,255,0.1);
}

.tf-section-title {
    font-family: var(--display);
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-top: 10px;
}

.tf-section-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--white-dim);
    font-weight: 300;
    align-self: end;
}

/* ─── SEVERITY BADGES ────────────────────────────────────────── */
.tf-severity {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    font-weight: 700;
}

.sev-critical { background: rgba(255,45,74,0.15);  color: var(--red);      border: 1px solid rgba(255,45,74,0.35); }
.sev-high     { background: rgba(255,140,0,0.15);  color: #ff8c00;         border: 1px solid rgba(255,140,0,0.35); }
.sev-medium   { background: rgba(255,189,46,0.15); color: #ffbd2e;         border: 1px solid rgba(255,189,46,0.35); }
.sev-low      { background: rgba(39,201,63,0.12);  color: #27c93f;         border: 1px solid rgba(39,201,63,0.3); }
.sev-info     { background: rgba(26,107,255,0.12); color: var(--blue-bright); border: 1px solid rgba(26,107,255,0.3); }

/* Active badge */
.tf-active-badge {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tf-active-badge--on  { background: rgba(39,201,63,0.12);  color: #27c93f; border: 1px solid rgba(39,201,63,0.3); }
.tf-active-badge--off { background: rgba(255,255,255,0.05); color: #555;    border: 1px solid rgba(255,255,255,0.08); }

.tf-pulse {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #27c93f;
    animation: tfPulse 1.5s ease-in-out infinite;
    display: inline-block;
    flex-shrink: 0;
}

.tf-pinned {
    font-family: var(--mono);
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.06em;
}

/* Sector badge */
.tf-sector-badge {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    background: rgba(26,107,255,0.1);
    color: var(--blue-bright);
    border: 1px solid rgba(26,107,255,0.2);
}

/* ─── SHARED CARD ELEMENTS ───────────────────────────────────── */
.tf-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tf-card-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.tf-card-date {
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.tf-card-title {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    line-height: 1.2;
}

.tf-card-aliases {
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(154,174,203,0.6);
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.tf-card-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--white-dim);
    font-weight: 300;
    margin-bottom: 20px;
}

.tf-card-victim {
    font-size: 13px;
    color: var(--white-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-family: var(--mono);
}

.tf-card-victim svg {
    flex-shrink: 0;
    color: var(--blue-bright);
}

/* Meta grid */
.tf-card-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(26,107,255,0.08);
    margin-bottom: 20px;
}

.tf-meta-item {
    background: rgba(255,255,255,0.02);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tf-meta-item--full {
    grid-column: 1 / -1;
}

.tf-meta-label {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(154,174,203,0.5);
}

.tf-meta-value {
    font-size: 13px;
    color: var(--white);
    font-weight: 400;
}

/* Meta pills (inline) */
.tf-card-meta-row-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.tf-meta-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 5px 12px;
    font-size: 12px;
    color: var(--white);
}

.tf-meta-pill .tf-meta-label {
    font-size: 9px;
}

/* MITRE tags */
.tf-mitre-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tf-mitre-tag {
    font-family: var(--mono);
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(26,107,255,0.15);
    border: 1px solid rgba(26,107,255,0.3);
    color: var(--blue-bright);
}

/* Detections */
.tf-detections {
    background: rgba(26,107,255,0.05);
    border: 1px solid rgba(26,107,255,0.15);
    border-left: 3px solid var(--blue);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.tf-detections-label {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-bright);
    margin-bottom: 8px;
}

.tf-detections p {
    font-size: 13px;
    line-height: 1.65;
    color: var(--white-dim);
    margin: 0;
}

/* Card footer */
.tf-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.tf-source-link {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue-bright);
    text-decoration: none;
    transition: color 0.2s;
}

.tf-source-link:hover { color: var(--white); }

.tf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tf-tag {
    font-family: var(--mono);
    font-size: 10px;
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(154,174,203,0.7);
}

/* ─── RANSOMWARE GROUP GRID ──────────────────────────────────── */
.tf-group-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: rgba(26,107,255,0.08);
}

.tf-group-card {
    background: var(--navy);
    padding: 32px;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}

.tf-group-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 0;
    background: linear-gradient(180deg, var(--red), var(--blue));
    transition: height 0.4s ease;
}

.tf-group-card:hover { background: var(--navy-light); }
.tf-group-card:hover::before { height: 100%; }

/* ─── INCIDENT TIMELINE ──────────────────────────────────────── */
.tf-timeline {
    position: relative;
    padding-left: 32px;
}

.tf-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 12px;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg, var(--red) 0%, rgba(26,107,255,0.3) 60%, transparent 100%);
}

.tf-timeline-item {
    position: relative;
    margin-bottom: 2px;
    display: flex;
    gap: 0;
}

.tf-timeline-dot {
    position: absolute;
    left: -28px;
    top: 28px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--red);
    border: 2px solid var(--navy);
    box-shadow: 0 0 10px rgba(255,45,74,0.4);
    flex-shrink: 0;
}

.tf-timeline-card {
    background: var(--navy);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 28px 32px;
    flex: 1;
    transition: background 0.3s, border-color 0.3s;
}

.tf-timeline-card:hover {
    background: var(--navy-light);
    border-color: rgba(26,107,255,0.2);
}

/* ─── MALWARE GRID ───────────────────────────────────────────── */
.tf-malware-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: rgba(26,107,255,0.08);
}

.tf-malware-card {
    background: var(--navy);
    padding: 32px;
    transition: background 0.3s;
}

.tf-malware-card:hover { background: var(--navy-light); }

/* ─── IOC BLOCK ──────────────────────────────────────────────── */
.tf-ioc-block {
    background: #050c1a;
    border: 1px solid rgba(26,107,255,0.2);
    padding: 20px;
    margin-bottom: 20px;
    font-family: var(--mono);
}

.tf-ioc-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue-bright);
    margin-bottom: 14px;
}

.tf-ioc-group {
    margin-bottom: 14px;
}

.tf-ioc-group:last-child { margin-bottom: 0; }

.tf-ioc-type {
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(154,174,203,0.5);
    display: block;
    margin-bottom: 6px;
}

.tf-ioc-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tf-ioc-item {
    font-family: var(--mono);
    font-size: 12px;
    padding: 3px 10px;
    background: rgba(255,45,74,0.08);
    border: 1px solid rgba(255,45,74,0.2);
    color: #ff8c8c;
    border-radius: 2px;
    word-break: break-all;
}

.tf-ioc-item--hash {
    font-size: 11px;
    color: #9aaecb;
    background: rgba(26,107,255,0.05);
    border-color: rgba(26,107,255,0.15);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── EMPTY STATE ────────────────────────────────────────────── */
.tf-empty {
    padding: 48px 32px;
    text-align: center;
    background: rgba(255,255,255,0.02);
    border: 1px dashed rgba(26,107,255,0.15);
}

.tf-empty p {
    color: var(--white-dim);
    font-size: 14px;
    margin-top: 12px;
    font-weight: 300;
}

/* ─── CTA STRIP ──────────────────────────────────────────────── */
.tf-cta-strip {
    background: var(--navy-mid);
    border: 1px solid rgba(26,107,255,0.15);
    border-left: 3px solid var(--blue);
    padding: 36px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.tf-cta-strip h3 {
    font-family: var(--display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.tf-cta-strip p {
    font-size: 14px;
    color: var(--white-dim);
    font-weight: 300;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .tf-hero-inner {
        grid-template-columns: 1fr 280px;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .tf-hero { padding: 60px 0 48px; }

    .tf-hero-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .tf-status-panel { display: none; } /* Show as a collapsed bar on mobile */

    .tf-tabs-bar { top: 64px; }

    .tf-tab { padding: 14px 18px; font-size: 11px; }

    .tf-section-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tf-group-grid,
    .tf-malware-grid {
        grid-template-columns: 1fr;
    }

    .tf-group-card,
    .tf-malware-card {
        padding: 24px 20px;
    }

    .tf-timeline { padding-left: 24px; }
    .tf-timeline-dot { left: -20px; }

    .tf-timeline-card { padding: 22px 20px; }

    .tf-card-meta-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tf-ioc-item--hash {
        max-width: 100%;
        font-size: 10px;
    }

    .tf-cta-strip {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px;
    }
}

@media (max-width: 480px) {
    .tf-hero { padding: 48px 0 36px; }

    .tf-section { margin-bottom: 56px; }

    .tf-card-meta-grid {
        grid-template-columns: 1fr;
    }

    .tf-card-title { font-size: 17px; }

    .tf-tab { padding: 12px 14px; }

    .tf-timeline { padding-left: 20px; }
    .tf-timeline-dot { left: -16px; width: 8px; height: 8px; top: 24px; }

    .tf-ioc-list { flex-direction: column; }

    .tf-cta-strip { padding: 24px 16px; }
}

/* ─── TAB COUNTS ─────────────────────────────────────────────── */
.tf-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: rgba(255,255,255,0.08);
    font-size: 10px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}
.tf-tab--active .tf-tab-count {
    background: rgba(26,107,255,0.25);
    color: var(--blue-bright);
}
.tf-tab-count--warn {
    background: rgba(255,45,74,0.2) !important;
    color: var(--red) !important;
}

/* ─── ADMIN NOTICE (visible only to logged-in editors) ──────── */
.tf-admin-notice {
    background: rgba(255,189,46,0.1);
    border: 1px solid rgba(255,189,46,0.3);
    border-left: 3px solid #ffbd2e;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-family: var(--mono);
    font-size: 12px;
    color: #ffbd2e;
    line-height: 1.5;
}
.tf-admin-notice a {
    color: var(--blue-bright);
    text-decoration: underline;
}
