/* /trends/url-scan — public Malware Trends dashboard */

.trends-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.trends-window-chips {
    display: flex;
    gap: 6px;
}
.window-chip {
    font: 500 12px/1 var(--mono);
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--bg-1);
    color: var(--ink-2);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: all 0.12s;
}
.window-chip:hover { color: var(--ink); border-color: var(--line-2); }
.window-chip.on {
    border-color: var(--accent-line);
    background: var(--accent-soft);
    color: var(--accent-1);
}

.trends-totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.trend-stat {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--bg-1);
}
.trend-stat .ts-n {
    font: 700 28px/1 var(--sans);
    color: var(--ink);
    letter-spacing: -0.02em;
}
.trend-stat .ts-l {
    font: 500 11px/1 var(--mono);
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 6px;
}
.trend-stat[data-stat="malware"]    .ts-n { color: oklch(64% 0.22 25); }
.trend-stat[data-stat="phishing"]   .ts-n { color: oklch(70% 0.18 50); }
.trend-stat[data-stat="suspicious"] .ts-n { color: oklch(72% 0.16 80); }

.trends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 16px;
}

/* Bar list — used by every "top N" panel. Renders as a horizontal
   bar where the bar width is proportional to the row's hit count
   relative to the row with the highest count in the same panel. */
.trend-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.trend-bar {
    display: grid;
    grid-template-columns: 1fr 60px;
    gap: 12px;
    align-items: center;
}
.trend-bar .label {
    font-size: 13px;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.trend-bar .label .sub {
    font: 500 11px/1 var(--mono);
    color: var(--ink-3);
    margin-left: 6px;
    letter-spacing: 0.04em;
}
.trend-bar .track {
    grid-column: 1 / -1;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    overflow: hidden;
}
.trend-bar .fill {
    height: 100%;
    background: linear-gradient(90deg, oklch(72% 0.22 25), oklch(56% 0.22 25));
    border-radius: 2px;
    transition: width 0.4s ease;
}
.trend-bar .count {
    text-align: right;
    font: 600 13px/1 var(--mono);
    color: var(--ink-2);
}
.trend-bars-empty {
    padding: 20px;
    text-align: center;
    color: var(--ink-3);
    font-size: 12px;
}

/* Recent malicious feed */
.trends-recent {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.trends-recent a.trend-recent-row {
    display: grid;
    grid-template-columns: 90px 1fr 70px 90px 60px;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    align-items: center;
    transition: background 0.12s;
}
.trends-recent a.trend-recent-row:first-child { border-top: 0; }
.trends-recent a.trend-recent-row:hover { background: var(--bg-2); }
.trends-recent .verd {
    font: 600 11px/1 var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    border-radius: var(--r-md);
    text-align: center;
}
.trends-recent .verd.malware    { background: oklch(64% 0.22 25 / 0.18); color: oklch(72% 0.22 25); }
.trends-recent .verd.phishing   { background: oklch(70% 0.18 50 / 0.18); color: oklch(78% 0.18 50); }
.trends-recent .verd.suspicious { background: oklch(72% 0.16 80 / 0.18); color: oklch(80% 0.16 80); }
.trends-recent .host { font: 500 13px/1.4 var(--mono); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trends-recent .score { font: 600 13px/1 var(--mono); color: var(--ink-2); text-align: right; }
.trends-recent .country { font: 500 11.5px/1 var(--mono); color: var(--ink-3); }
.trends-recent .when { font: 500 11px/1 var(--mono); color: var(--ink-3); text-align: right; }

@media (max-width: 720px) {
    .trends-recent a.trend-recent-row {
        grid-template-columns: 70px 1fr 50px;
    }
    .trends-recent .country, .trends-recent .when { display: none; }
}
