/* HttpNex tool UI: endpoint "Try it" cards, request tester, response viewer, status codes, form tester, home examples. */
.hn-hero { padding-bottom: 30px; }
.mono, code, .hn-code { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; }

/* method badges */
.hn-m { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; padding: 3px 8px; border-radius: 7px; font: 700 11.5px/1.3 'JetBrains Mono', monospace;
  letter-spacing: .02em; color: #fff; background: #64748B; flex: none; }
.m-get { background: #0F766E; } .m-post { background: #C2410C; } .m-put { background: #1D4ED8; } .m-patch { background: #7C3AED; }
.m-delete { background: #B91C1C; } .m-head, .m-options { background: #475569; } .m-any { background: linear-gradient(135deg, #0D9488, #4F46E5); }

/* status pills */
.hn-status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font: 700 12.5px/1.35 'JetBrains Mono', monospace; white-space: nowrap; }
.hn-status.s2 { background: var(--success-bg); color: #166534; } .hn-status.s3 { background: #DBEAFE; color: #1E40AF; }
.hn-status.s4 { background: var(--warning-bg); color: #92400E; } .hn-status.s5 { background: var(--danger-bg); color: #991B1B; } .hn-status.s0 { background: var(--surface-2); color: var(--muted); }
:root[data-theme="dark"] .hn-status.s2 { background: rgba(74,222,128,.15); color: #86EFAC; } :root[data-theme="dark"] .hn-status.s3 { background: rgba(96,165,250,.16); color: #93C5FD; }
:root[data-theme="dark"] .hn-status.s4 { background: rgba(251,191,36,.15); color: #FCD34D; } :root[data-theme="dark"] .hn-status.s5 { background: rgba(248,113,113,.16); color: #FCA5A5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hn-status.s2 { background: rgba(74,222,128,.15); color: #86EFAC; } :root:not([data-theme="light"]) .hn-status.s3 { background: rgba(96,165,250,.16); color: #93C5FD; }
  :root:not([data-theme="light"]) .hn-status.s4 { background: rgba(251,191,36,.15); color: #FCD34D; } :root:not([data-theme="light"]) .hn-status.s5 { background: rgba(248,113,113,.16); color: #FCA5A5; }
}

/* endpoint cards */
.hn-eps-tool { background: transparent; border: 0; box-shadow: none; overflow: visible; display: flex; flex-direction: column; gap: 16px; }
.hn-eps-intro { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--surface); }
.hn-eps-intro code { font-size: 13.5px; }
.hn-ep { padding: 0; overflow: hidden; scroll-margin-top: calc(var(--header-h) + 16px); transition: box-shadow .3s; }
.hn-ep.flash { box-shadow: 0 0 0 3px var(--primary-100), var(--shadow-card); }
.hn-ep-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.hn-path { font-size: 15px; font-weight: 600; color: var(--text); word-break: break-all; }
.hn-path i { font-style: normal; color: var(--primary); }
.hn-ep-sum { font-size: 14px; flex: 1 1 260px; }
.hn-m-select { width: auto; min-height: 34px; padding: 4px 30px 4px 10px; font: 700 13px 'JetBrains Mono', monospace; }
.hn-ep-form { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.hn-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.hn-f { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; min-width: 0; }
.hn-f small { font-size: 12px; }
.hn-f .input { min-height: 38px; padding: 7px 10px; font-size: 14px; }
.hn-body-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.hn-ct { width: auto; min-height: 34px; padding: 4px 30px 4px 10px; font-size: 13px; }
.hn-ct-input { width: 220px; min-height: 32px; padding: 4px 10px; font-size: 13px; }
.hn-ep-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 14px 16px; }
.hn-url { flex: 1 1 200px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-ep-res { border-top: 1px solid var(--line); }

/* response viewer */
.hn-res { min-height: 70px; }
.hn-res-empty, .hn-res-busy { display: flex; align-items: center; gap: 8px; padding: 18px 16px; }
.hn-res-busy .btn { margin-left: auto; }
.hn-res-err { margin: 12px 16px; border-radius: var(--r-md); }
.spin { animation: hnspin 1s linear infinite; } @keyframes hnspin { to { transform: rotate(360deg); } }
.hn-status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px 8px; }
.hn-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.hn-redir { color: var(--accent); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-res-tabs { margin: 0 16px 10px; }
.hn-res-body { padding: 0 16px 16px; }
.hn-code { margin: 0; padding: 14px; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13px; line-height: 1.55;
  overflow: auto; max-height: 460px; white-space: pre-wrap; word-break: break-word; tab-size: 2; color: var(--text); }
.hn-hex { white-space: pre; word-break: normal; }
.j-k { color: #0F766E; } .j-s { color: #B45309; } .j-n { color: #4338CA; } .j-b { color: #BE123C; font-weight: 600; }
:root[data-theme="dark"] .j-k { color: #5EEAD4; } :root[data-theme="dark"] .j-s { color: #FCD34D; } :root[data-theme="dark"] .j-n { color: #A5B4FC; } :root[data-theme="dark"] .j-b { color: #FDA4AF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .j-k { color: #5EEAD4; } :root:not([data-theme="light"]) .j-s { color: #FCD34D; }
  :root:not([data-theme="light"]) .j-n { color: #A5B4FC; } :root:not([data-theme="light"]) .j-b { color: #FDA4AF; } }
.hn-headers { width: 100%; border-collapse: collapse; font-size: 13px; }
.hn-headers th, .hn-headers td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hn-headers th { font-family: 'JetBrains Mono', monospace; font-weight: 600; white-space: nowrap; color: var(--text-2); width: 1%; }
.hn-headers td { font-family: 'JetBrains Mono', monospace; word-break: break-all; }
.hn-img { padding: 14px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--elev) 0 50%) 0 0 / 20px 20px; border-radius: var(--r-md); border: 1px solid var(--line); text-align: center; }
.hn-img img { max-width: 100%; height: auto; border-radius: 6px; }
.hn-empty-body { padding: 14px; border: 1px dashed var(--line-2); border-radius: var(--r-md); }
.hn-stream { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; max-height: 420px; overflow: auto; padding: 10px; background: var(--code-bg); border: 1px solid var(--line); border-radius: var(--r-md); }
.hn-stream > div { white-space: pre-wrap; word-break: break-all; }
.hn-stream code { font-size: 12.5px; }
.hn-snip { display: flex; flex-direction: column; gap: 12px; }
.hn-snip-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 13.5px; }

/* request tester */
.hn-tester { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hn-bar { display: flex; gap: 8px; align-items: stretch; }
.hn-bar .hn-m-select { min-height: 44px; font-size: 14px; }
.hn-urlbox { flex: 1; display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--elev); min-width: 0; }
.hn-urlbox:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.hn-origin { padding: 0 0 0 12px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.hn-urlbox .input { border: 0; box-shadow: none !important; background: transparent; min-height: 42px; padding-left: 2px; font-size: 14.5px; }
.hn-send { min-height: 44px; padding: 0 22px; }
.hn-bar2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hn-bar2 .select { max-width: 520px; min-height: 36px; font-size: 13.5px; }
.hn-tabs { align-self: flex-start; flex-wrap: wrap; }
.hn-pane { display: flex; flex-direction: column; gap: 10px; }
.hn-pane > p { margin: 0; }
.hn-kv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.hn-kv-row .input, .hn-kv-row .select { min-height: 36px; padding: 6px 10px; font-size: 13.5px; }
.hn-kv-row .input:not([type="file"]) { font-family: 'JetBrains Mono', monospace; }
.hn-kv-type { width: 88px; }
.hn-res-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--elev); }
.hn-res-h { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.hn-hist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.hn-hist-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--elev); cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.hn-hist-item:hover { border-color: var(--primary); }
.hn-hist-item code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* status code reference */
.hn-codes-tool { padding: 16px; }
.hn-codes-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.hn-codes-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.hn-codes-list { display: flex; flex-direction: column; gap: 6px; }
.hn-codes-g { margin: 12px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hn-codes-g:first-child { margin-top: 0; }
.hn-code-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.hn-code-row.on { border-color: var(--primary); background: var(--primary-50); }
.hn-code-row .hn-status { min-width: 52px; justify-content: center; }
.hn-codes-res { position: sticky; top: calc(var(--header-h) + 16px); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 1000px) { .hn-codes-grid { grid-template-columns: 1fr; } .hn-codes-res { position: static; } }

/* form tester */
.hn-form-tool { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.hn-order { display: flex; flex-direction: column; gap: 14px; }
.hn-fs { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 14px 12px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.hn-fs legend { font-weight: 600; font-size: 13.5px; padding: 0 6px; }
.hn-fs label { display: inline-flex; gap: 6px; align-items: center; }
.hn-form-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* home: quick examples + all endpoints */
.hn-quick { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.hn-quick-list { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); padding: 8px; gap: 4px; }
.hn-quick-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid transparent; border-radius: var(--r-md); background: transparent; cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.hn-quick-item:hover { background: var(--elev); border-color: var(--line); }
.hn-quick-item.on { background: var(--elev); border-color: var(--primary); box-shadow: var(--shadow-card); }
.hn-quick-item b { display: block; font-size: 13.5px; }
.hn-quick-item code { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hn-quick-item .grow { min-width: 0; }
.hn-quick-out { min-width: 0; }
.hn-term { display: flex; align-items: center; gap: 8px; margin: 14px 16px 0; padding: 10px 12px; border-radius: var(--r-md); background: #0B1220; color: #E2E8F0; font-size: 13px; }
.hn-term code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; color: #A7F3D0; }
.hn-term .btn { color: #CBD5E1; }
.hn-quick .hn-res { min-height: 320px; }
@media (max-width: 860px) { .hn-quick { grid-template-columns: 1fr; } .hn-quick-list { border-right: 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .hn-quick-list { grid-template-columns: 1fr; } }
.hn-all-eps { margin-top: 34px; }
.hn-ep-cols { columns: 3 300px; column-gap: 16px; }
.hn-ep-group { break-inside: avoid; margin-bottom: 16px; display: flex; flex-direction: column; gap: 4px; }
.hn-ep-group-h { font-weight: 700; color: var(--text); margin-bottom: 4px; }
.hn-ep-row { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 8px; color: var(--text-2); }
.hn-ep-row:hover { background: var(--surface-2); }
.hn-ep-row .hn-m { min-width: 64px; font-size: 10.5px; }
.hn-ep-row code { font-size: 13px; word-break: break-all; }

@media (max-width: 640px) {
  .hn-bar { flex-wrap: wrap; } .hn-urlbox { flex-basis: 100%; order: 3; } .hn-origin { display: none; }
  .hn-kv-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .hn-kv-type { grid-column: 1 / 3; width: 100%; }
  .hn-url { text-align: left; flex-basis: 100%; }
}
