/* The Relay customer portal (static/relay/portal.html). Colors and the header come from /comms/calls_page.css; the
 * Calls tab is styled by /css/calls_inbox.css. */
.pt-org { margin-left: .5rem; background: var(--bg-panel); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 6px; padding: .25rem .4rem; }
.pt-org[hidden], .pt-tabs[hidden], .pt-pane[hidden] { display: none; }
.pt-tabs { display: flex; gap: .25rem; padding: .4rem 1rem 0; border-bottom: 1px solid var(--border-color); overflow-x: auto; }
.pt-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--text-muted); padding: .55rem .8rem; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pt-tabs button[aria-current="page"] { color: var(--text-primary); border-bottom-color: var(--accent); }
.pt-pane { max-width: 900px; width: 100%; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.pt-pane h2 { margin: 0 0 .6rem; font-size: 1.2rem; }
.pt-pane h2 small { color: var(--text-muted); font-weight: 500; font-size: .85rem; }
.pt-note { color: var(--text-muted); font-size: .9rem; }
.pt-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: .5rem 0 1rem; }
.pt-table th, .pt-table td { text-align: left; padding: .45rem .4rem; border-top: 1px solid var(--border-color); }
.pt-table th { color: var(--text-muted); font-weight: 600; border-top: 0; }
.pt-add { display: flex; gap: .5rem; flex-wrap: wrap; }
.pt-add input, .pt-add select { background: var(--bg-panel); color: var(--text-primary); border: 1px solid var(--border-color); border-radius: 6px; padding: .45rem .55rem; font: inherit; }
.pt-add input { flex: 1; min-width: 200px; }
.pt-card { background: var(--bg-panel); border: 1px solid var(--border-color); border-radius: 10px; padding: .8rem 1rem; margin: 0 0 .8rem; }
.pt-card h3 { margin: 0 0 .4rem; font-size: 1rem; }
.pt-card p { margin: .35rem 0; }
.pt-card ul { margin: .3rem 0; padding-left: 1.2rem; color: var(--text-muted); font-size: .88rem; }
.pt-bar { display: block; height: 6px; margin-top: .3rem; background: rgba(148, 163, 184, .2); border-radius: 3px; overflow: hidden; }
.pt-bar span { display: block; height: 100%; background: var(--accent); }
#view-calls { flex: 1; min-height: 0; padding: 1rem; height: auto; }
/* calls by text sits above the calls list (portal.js drawTexts) */
#view-calls { flex-direction: column; }
#view-calls > #calls-root { flex: 1; min-height: 0; }
#pt-texts .pt-texts, #pt-texts-settings .pt-texts { margin: 0 0 .8rem; }
.pt-switch { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--border-color); cursor: pointer; }
.pt-switch:first-of-type { border-top: 0; }
.pt-switch input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--accent); flex: none; }
.pt-anim-head { margin: 1rem 0 .2rem; padding-top: .8rem; border-top: 1px solid var(--border-color); font-size: .95rem; }
.pt-switch input:disabled, .pt-switch input:disabled + span { cursor: default; opacity: .6; }
.pt-switch small { display: block; color: var(--text-muted); font-size: .85rem; margin-top: .1rem; }
/* Relay's AI on each site's Features card (portal.js aiChoice) */
.pt-ai { border-top: 1px solid var(--border-color); margin-top: .4rem; padding-top: .55rem; }
.pt-ai-pick { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .2rem; }
.pt-ai-pick select { max-width: 32rem; padding: .4rem .5rem; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-panel); color: inherit; font: inherit; }
.pt-ai .pt-switch { border-top: 0; }
/* Knowledge: each site's documents and the upload review (portal.js drawKnowledge, showReview) */
.pt-docs { list-style: none; padding: 0; margin: .3rem 0 .6rem; color: inherit; font-size: .92rem; }
.pt-docs li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--border-color); }
.pt-docs li:first-child { border-top: 0; }
.pt-docs small { display: block; color: var(--text-muted); }
/* questions Relay couldn't answer (Knowledge tab) */
.pt-questions { border-bottom: 1px solid var(--border-color); padding-bottom: .6rem; margin-bottom: .6rem; }
.pt-questions h4 { margin: .2rem 0; font-size: .95rem; }
.pt-qs { list-style: none; padding: 0; margin: .3rem 0 0; font-size: .92rem; }
.pt-qs li { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--border-color); }
.pt-q { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pt-q small { display: block; color: var(--text-muted); }
.pt-q-acts { display: flex; gap: .4rem; flex-shrink: 0; }
.pt-qa { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.pt-qa[hidden] { display: none; }
.pt-qa input, .pt-qa textarea { padding: .4rem .5rem; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-panel); color: inherit; font: inherit; }
.pt-qa textarea { resize: vertical; }
.pt-qa .rl-btn { align-self: flex-start; }
@media (max-width: 560px) { .pt-qs li { flex-direction: column; } }
.pt-upload { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; border-top: 1px solid var(--border-color); padding-top: .6rem; }
.pt-upload label { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 600; }
.pt-upload select, .pt-review input, .pt-review textarea { padding: .4rem .5rem; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-panel); color: inherit; font: inherit; }
.pt-review { flex-basis: 100%; margin-top: .6rem; }
.pt-review[hidden] { display: none; }
.pt-review h4 { margin: .6rem 0 .3rem; font-size: .95rem; }
.pt-warn { color: #f59e0b; font-weight: 600; margin: .3rem 0; }
.pt-topic { display: grid; grid-template-columns: 1fr auto; gap: .35rem .6rem; padding: .5rem 0; border-top: 1px solid var(--border-color); }
.pt-topic input { grid-column: 1; font-weight: 600; }
.pt-topic textarea { grid-column: 1; resize: vertical; }
.pt-topic button { grid-column: 2; grid-row: 1; }
.pt-rule { display: grid; grid-template-columns: auto 1fr auto 1fr auto; gap: .4rem; align-items: center; padding: .4rem 0; }
.pt-review-bar { display: flex; gap: .6rem; margin-top: .6rem; }
@media (max-width: 640px) { .pt-rule { grid-template-columns: auto 1fr; } }
/* live helper seats on the Team tab (portal.js drawTeam; Nathan 2026-11-02: 5, 15 or 25 a website, more at $10 a month) */
.pt-seats .pt-seats-count { font-weight: 700; margin: 0 0 .2rem; }
.pt-seats .pt-seats-count.full { color: #f59e0b; }
.pt-seats #pt-seat-count { flex: 0 0 5rem; min-width: 0; }
.pt-seats .pt-add { align-items: center; margin-top: .4rem; }
/* extra usage on the Wallet tab (portal.js drawExtra; Nathan 2026-11-02: "Lets turn on actual billing") */
#pt-extra { margin-top: 1rem; }
#pt-extra .pt-paid { margin: .7rem 0 .5rem; }
.pt-topup { align-items: center; margin-top: .4rem; }
.pt-topup label { display: flex; align-items: center; gap: .3rem; font-size: .9rem; }
.pt-topup input { flex: 0 0 5.5rem; min-width: 0; }
/* Processes and API connections (portal.js drawAsks, drawLocked; Nathan 2026-11-02: "they should be grayed out for the
 * starter plan") */
.pt-tabs button.pt-locked { opacity: .45; }
.pt-tabs button.pt-locked[aria-current="page"] { opacity: .75; border-bottom-color: var(--text-muted); }
.pt-lock { margin-right: .3rem; vertical-align: -1px; }
.pt-ask-count { font-weight: 600; }
.pt-card .pt-asks { list-style: none; padding: 0; margin: .3rem 0 .2rem; color: inherit; font-size: .92rem; }
.pt-asks li { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; padding: .55rem 0; border-top: 1px solid var(--border-color); }
.pt-asks li:first-child { border-top: 0; }
.pt-asks small { display: block; color: var(--text-muted); margin-top: .1rem; overflow-wrap: anywhere; }
.pt-asks a { font-size: .85rem; overflow-wrap: anywhere; }
.pt-ask-side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; flex: none; }
.pt-ask-side select { padding: .25rem .4rem; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-panel); color: inherit; font: inherit; font-size: .85rem; }
.pt-status { font-size: .78rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px; background: rgba(148, 163, 184, .2); white-space: nowrap; }
.pt-status.building { background: rgba(59, 130, 246, .18); color: #60a5fa; }
.pt-status.live { background: rgba(34, 197, 94, .18); color: #22c55e; }
.pt-status.declined, .pt-status.withdrawn { opacity: .7; }
.pt-ask { display: grid; gap: .6rem; }
.pt-ask label { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 600; }
.pt-ask input, .pt-ask select, .pt-ask textarea { padding: .45rem .55rem; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-panel); color: inherit; font: inherit; font-weight: 400; }
.pt-ask textarea { resize: vertical; }
.pt-ask .pt-note { margin: 0; }
.pt-ask button { justify-self: start; }
.pt-upsell .pt-ok { color: #22c55e; font-weight: 600; }
.pt-up { display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0; }
.pt-compare { display: inline-block; margin-top: .3rem; font-size: .9rem; color: var(--accent); }
.pt-asks a { color: var(--accent); }
.pt-tabs { scrollbar-width: thin; flex: none; }     /* a tall pane never squeezes the tab row */
@media (max-width: 640px) { .pt-asks li { flex-direction: column; } .pt-ask-side { align-items: flex-start; } }
/* your own Wallet in the Wallet tab (portal.js drawWallet, startPay; Nathan 2026-11-02: "it should open the wallet
 * there under the menu, not open it up separate") */
.pt-wallet .pt-credit { display: flex; align-items: baseline; gap: .6rem; margin: .1rem 0 .3rem; }
.pt-wallet .pt-credit span { color: var(--text-muted); font-size: .9rem; }
.pt-wallet .pt-credit b { font-size: 1.6rem; }
.pt-wallet-actions { align-items: center; margin: .6rem 0 .4rem; }
.pt-wallet-actions select { flex: 0 0 auto; }
.pt-wallet-topup { border-top: 1px solid var(--border-color); margin-top: .7rem; padding-top: .2rem; }
.pt-reloads-head { border-top: 1px solid var(--border-color); margin: .7rem 0 0; padding-top: .6rem; font-size: .95rem; }
.pt-pay { border-top: 1px solid var(--border-color); margin-top: .8rem; padding-top: .7rem; }
.pt-pay-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.pt-pay-frame { min-height: 360px; border-radius: 10px; overflow: hidden; background: #fff; }
/* the email code before a purchase (portal.js confirmPurchase; Nathan 2026-11-02: "add a 2FA with email") */
.pt-code { border-top: 1px solid var(--border-color); margin-top: .7rem; padding-top: .6rem; }
.pt-code p { margin: 0 0 .45rem; }
.pt-code-row { align-items: center; }
.pt-code-row input { flex: 0 0 9rem; min-width: 0; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
/* Relay codes, a Process Runner administrator's Coupons tab (portal.js drawCoupons) */
.pt-add input.pt-coupon-uses { flex: 0 0 5.5rem; min-width: 0; }
.pt-coupon-made { border-color: var(--accent); }
#pt-coupons td .rl-btn { margin: 0 .3rem .3rem 0; }
#pt-coupons code { white-space: nowrap; }
/* the administrator's link to Relay stats in the header (portal.js start) */
.pt-stats { color: var(--accent); font-size: .85rem; text-decoration: none; }
.pt-stats:hover { text-decoration: underline; }
.pt-stats[hidden] { display: none; }
