/* http-headers.css */

.hh-main { max-width: 760px; }

.backend-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}
.backend-banner.hidden { display: none; }

.input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.input-row .tool-input { flex: 1; min-width: 200px; }

.hh-status-bar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    flex-wrap: wrap;
}

.status-code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1rem;
    padding: 0.15rem 0.6rem;
    border-radius: var(--radius-sm);
}
.status-2xx { background: #d4edda; color: #1a7d44; }
.status-3xx { background: #d0e8ff; color: #1a4a8a; }
.status-4xx { background: #fff3cd; color: #7d5a00; }
.status-5xx { background: #f8d7da; color: #c00; }

.hh-url { font-family: var(--font-mono); font-size: 0.85rem; color: var(--color-text-muted); word-break: break-all; }

.hh-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    font-size: 0.88rem;
}
.hh-table th {
    background: #f0f4fa;
    padding: 0.4rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--color-border);
}
.hh-table td {
    padding: 0.45rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-all;
}
.hh-table td:first-child { font-family: var(--font-mono); font-weight: 600; color: #1a4a8a; white-space: nowrap; width: 1%; }
.hh-table tr:last-child td { border-bottom: none; }

.security-warn { color: #c00; font-size: 0.8rem; }
.security-ok   { color: #1a7d44; font-size: 0.8rem; }

.hh-error {
    background: #fff0f0;
    border: 1px solid #f5c2c2;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: #c00;
    font-size: 0.9rem;
}

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.hh-tabs {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.hhtab {
    padding: 0.45rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    font-family: var(--font-main);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hhtab.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.hhtab:not(.active):hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.hh-panel { display: none; }
.hh-panel.active { display: block; }

.hh-tab-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}

/* ── OS result card ────────────────────────────────────────────────────────── */
.os-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.os-card-header {
    padding: 0.65rem 1rem;
    background: #f0f4fa;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
    font-weight: 700;
}

.os-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.os-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #e8f4fd;
    color: #1a5a8a;
    border: 1px solid #90c4f0;
}

.os-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.os-table td {
    padding: 0.4rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
}
.os-table tr:last-child td { border-bottom: none; }
.os-table td:first-child {
    font-weight: 600;
    font-family: var(--font-mono);
    color: #1a4a8a;
    white-space: nowrap;
    width: 40%;
}

.os-warn {
    background: #fff8e1;
    border: 1px solid #f0c040;
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    color: #7a5000;
    font-size: 0.88rem;
}

@media (max-width: 480px) { .input-row { flex-direction: column; } }
