/* Customer account pages (portal). Uses the shared look from theme.css and pages.css. */
.notice { padding: 24px; max-width: 40rem; }
.notice p { margin: 0 0 16px; }
.bar-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fine { color: var(--muted); font-size: 14px; min-height: 1.2em; }
.fine[role="alert"] { color: var(--bad); }
.panel { padding: 20px; }
.plan-name { font-size: 1.5rem; font-weight: 500; margin: 0 0 4px; }
.meter { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin: 14px 0 10px; }
.meter > span { display: block; height: 100%; background: var(--gold); border-radius: 6px; }
.meter.hot > span { background: var(--bad); }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin: 14px 0; }
.row label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.row input, .row select {
  min-width: 12rem; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: rgba(0, 0, 0, 0.35); color: var(--text); font: inherit;
}
.row input:focus, .row select:focus { border-color: var(--gold); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.reveal { margin: 14px 0; padding: 14px; border: 1px solid var(--gold); border-radius: 10px; background: rgba(232, 194, 122, 0.08); }
.reveal code { display: block; margin: 8px 0 12px; font: 500 14px var(--mono); word-break: break-all; color: var(--gold-hi); }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
td.mono { font-family: var(--mono); }
body.callback { display: grid; place-items: center; min-height: 100vh; text-align: center; }
body.callback main { padding: 24px; }

/* Pricing page estimate (pricing-tools.js) */
#calc input[type="text"] { width: 8rem; min-height: 2.75rem; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); font: inherit; text-align: end; }
#calc input[type="text"]:focus-visible { border-color: var(--accent); }
.calc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.calc-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.calc-seg [aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.calc-sum, .calc-msg { margin: 14px 0; }
.calc-msg { font-weight: 500; min-height: 1.6em; }
#calc tr.is-best td { background: var(--accent-soft); }
#calc td.num, #calc th.num { text-align: end; font-variant-numeric: tabular-nums; }

/* Developer page: quick start and the sandbox try-it panel */
.qs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.qs h3 { margin: 0 0 8px; font-size: 1.1rem; }
.qs pre { margin: 0; padding: 12px; font-size: 12px; overflow-x: auto; border-radius: 8px; background: var(--code-bg); color: var(--code-text); }
.play textarea { width: 100%; text-transform: none; letter-spacing: 0; font: 400 13px var(--mono); padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); resize: vertical; }
.play textarea:focus-visible, .play input:focus-visible { border-color: var(--accent); }
#try-key > .fine { max-width: 52rem; }
/* sign up / sign in button on the developer pages (hidden until the portal is on) */
.acct-bar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin: 0 0 12px; }
.acct-bar[hidden] { display: none; }
/* API guide */
.guide-toc { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 8px 12px; margin: 0 0 28px; }
.guide-toc a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; text-decoration: none; }
.guide-toc a:hover, .guide-toc a:focus-visible { background: var(--accent-soft); }

/* every section is a card with air around its parts */
.sect .panel { padding-top: 22px; padding-bottom: 22px; }
.sect .panel > p { margin: 0 0 14px; line-height: 1.6; }
.sect .panel > ul, .sect .panel > ol { margin: 0 0 16px; padding-left: 22px; }
.sect .panel li { margin: 7px 0; line-height: 1.55; }
.sect .panel h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.sect .panel > h3:first-child { margin-top: 0; }
.sect .panel + .panel { margin-top: 18px; }
.sect code { font-size: 0.88em; padding: 2px 6px; border-radius: 6px; }
.sect .qs h3 { margin: 0 0 8px; }

/* endpoint card header: title on the left, method, path and price on the right */
.ep-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.sect .panel .ep-head h3 { font-size: 1.35rem; margin: 0; }
.ep-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.ep-meta .verb { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; font-weight: 700; color: var(--accent); border: 1px solid var(--accent-line); border-radius: 6px; padding: 3px 7px; }
.ep-meta .badge { font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-hi); white-space: nowrap; }

/* code: one boxed block, a bar on top with the label and the Copy button, long lines wrap instead of being cut */
.codewrap { margin: 16px 0; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--surface-solid); }
.codebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 6px 2px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.codename { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted, #8a90a0); }
.codewrap .copy-btn.btn { min-height: 44px; min-width: 76px; }
.codewrap pre { margin: 0; padding: 14px 16px; border: 0; border-radius: 0; background: transparent; color: var(--text); white-space: pre; overflow-x: auto; scrollbar-width: thin; line-height: 1.55; tab-size: 2; }

/* fold-outs: a visible row with an arrow, so it is clear that it opens */
details.more { margin: 16px 0 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
details.more > summary { list-style: none; cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform 0.15s; flex: none; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more > :not(summary) { margin-left: 16px; margin-right: 16px; }
details.more > :last-child { margin-bottom: 16px; }
details.more > .codewrap { margin-left: 16px; margin-right: 16px; }

ul.cols { columns: 2 220px; column-gap: 28px; padding-left: 22px; }
ul.cols li { break-inside: avoid; margin: 5px 0; }
.sect td, .sect th { vertical-align: top; }
.table-wrap { margin: 16px 0; }
.table-wrap th[scope="row"] { white-space: nowrap; padding-right: 20px; text-align: left; }
/* the guide shows its four quick-start steps one under the other, so the code stays wide enough to read */
ol.qs.qs-stack { display: grid; grid-template-columns: 1fr; gap: 16px; }
ol.qs.qs-stack > li { min-width: 0; }
