/* HTTP Headers Reference page */
.hdrref-page { max-width: 1040px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.hdrref-hero { text-align: center; margin-bottom: 2.5rem; }
.hdrref-hero h1 { font-size: 2rem; margin-bottom: 0.75rem; color: var(--text); }
.hdrref-hero p { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0 auto 1rem; line-height: 1.6; }
.hdrref-meta { font-size: 0.9rem; color: var(--muted); }
.hdrref-meta #hdrref-count { font-weight: 700; color: var(--accent); }

/* Controls */
.hdrref-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }

.hdrref-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.hdrref-tab { padding: 0.4em 0.9em; background: var(--surface); border: 1px solid var(--border, rgba(255,255,255,0.06)); border-radius: 20px; color: var(--muted); font-size: 0.85rem; cursor: pointer; transition: all 0.18s; }
.hdrref-tab:hover { color: var(--text); border-color: var(--accent); }
.hdrref-tab--active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.hdrref-search-wrap { flex: 0 0 260px; }
.hdrref-search { width: 100%; padding: 0.5em 0.85em; background: var(--surface); border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 8px; color: var(--text); font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.hdrref-search:focus { border-color: var(--accent); }
.hdrref-search::placeholder { color: var(--muted); }

/* Grid */
.hdrref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.75rem; }

/* Card */
.hdrref-card { background: var(--surface); border: 1px solid var(--border, rgba(255,255,255,0.06)); border-radius: 10px; padding: 1rem 1.15rem; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.hdrref-card:hover, .hdrref-card:focus { border-color: var(--accent); background: rgba(255,255,255,0.03); outline: none; }
.hdrref-card[aria-expanded="true"] { border-color: var(--accent); }

.hdrref-card__top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.hdrref-card__left { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.hdrref-card__name { font-size: 0.95rem; font-weight: 700; font-family: monospace; color: var(--accent); background: rgba(89,168,255,0.07); padding: 0.15em 0.5em; border-radius: 4px; }
.hdrref-card__chevron { color: var(--muted); font-size: 1.2rem; transition: transform 0.2s; flex-shrink: 0; }
.hdrref-card[aria-expanded="true"] .hdrref-card__chevron { transform: rotate(90deg); }

.hdrref-card__summary { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }

/* Badge */
.hdrref-badge { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.15em 0.55em; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.hdrref-badge--request  { background: rgba(99,179,237,0.15); color: #63b3ed; }
.hdrref-badge--response { background: rgba(72,187,120,0.15); color: #48bb78; }
.hdrref-badge--security { background: rgba(245,101,101,0.15); color: #f56565; }
.hdrref-badge--caching  { background: rgba(237,185,83,0.15);  color: #edb953; }
.hdrref-badge--cors     { background: rgba(213,63,140,0.15);  color: #d53f8c; }

/* Detail (expanded) */
.hdrref-detail { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border, rgba(255,255,255,0.06)); }
.hdrref-detail__description { color: var(--text); font-size: 0.9rem; line-height: 1.6; margin-bottom: 0.75rem; }
.hdrref-detail__block { margin-bottom: 0.75rem; }
.hdrref-detail__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.3rem; }
.hdrref-detail__code { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.06); border-radius: 6px; padding: 0.6em 0.85em; overflow-x: auto; font-size: 0.82rem; line-height: 1.5; color: var(--text); margin: 0; white-space: pre-wrap; word-break: break-all; }
.hdrref-detail__code code { font-family: monospace; }

/* Empty state */
.hdrref-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); font-size: 1rem; }

/* Responsive */
@media (max-width: 600px) {
  .hdrref-hero h1 { font-size: 1.5rem; }
  .hdrref-grid { grid-template-columns: 1fr; }
  .hdrref-controls { flex-direction: column; align-items: stretch; }
  .hdrref-search-wrap { flex: none; }
  .hdrref-tabs { gap: 0.3rem; }
  .hdrref-tab { font-size: 0.8rem; padding: 0.35em 0.75em; }
}

:focus-visible { outline: 2px solid var(--accent, #59a8ff); outline-offset: 2px; border-radius: 4px; }
