/* ==========================================================================
   Store additions. site.css is the SlayHost template, unchanged; this file only
   adds what the store needs on top of it (account pages, dashboard, forms,
   tables) and never restyles the template's own classes.
   No inline styles anywhere: the store's Content-Security-Policy forbids them.
   ========================================================================== */

:root { --on: #2fb67c; --wait: #e5992b; --stop: #e5484d; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; padding: .5rem 1rem; background: var(--accent); color: #fff; z-index: 60; }
.skip:focus { left: 1rem; top: 1rem; }

/* Header: log-out buttons are small forms */
.header__actions form { display: inline-flex; margin: 0; }
.header__actions form .btn { font: inherit; font-size: 15px; font-weight: 500; }
.nav__logout { display: contents; }
.nav__logout .btn { width: 100%; font: inherit; font-weight: 500; }

/* Flash message under the header */
.flash { margin: 0; padding: 12px 0; background: #dff4ea; color: #064d33; font-size: 15px; }
.flash.error { background: #fbe4e5; color: #7f1218; }

/* ---------- Home: configurator built from the store's real options ---------- */
.hero__inner--single { grid-template-columns: 1fr; }
.region-picker + .region-picker { margin-top: 0; }
.region-opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.region-opt:has(input:disabled):hover { border-color: var(--line-strong); }
.field-select { display: grid; gap: 12px; }
.field-select select {
  width: 100%; height: 44px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--text);
  font: 500 15px var(--font); cursor: pointer;
}
.field-select select:focus { outline: none; border-color: var(--accent); }
.configurator__summary li b { overflow-wrap: anywhere; }
.configurator__price output { font: inherit; }
.configurator__summary .btn { font-family: var(--font); }

/* ---------- Inner pages ---------- */
.page { padding: 44px 0 80px; flex: 1; }
.page__inner { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 24px; }
.page:has(table) .page__inner { max-width: 1200px; }
.page h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); }
.page h2 { font-size: 18px; margin: 0 0 10px; }
.page p { margin: 0 0 12px; }
.page a:not(.btn) { color: var(--accent); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-head .eyebrow { margin-bottom: 10px; }
.back { display: inline-block; margin-bottom: 14px; font-size: 14px; text-decoration: none; }
.page a.back { color: var(--muted); }
.page a.back:hover { color: var(--text); }
.small { font-size: 14px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: .9em; }
.tone-red { color: var(--accent) !important; }
.help { margin-top: 24px; }
code { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }

.page .panel + .panel { margin-top: 18px; }
.panel__body { padding: 20px 18px; }
.panel__body > :first-child { margin-top: 0; }
.panel__body > :last-child { margin-bottom: 0; }
.panel.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.panel__foot--links { justify-content: space-between; flex-wrap: wrap; font-size: 14px; }

/* KPI cards on the dashboard / admin */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 22px; }
.kpi { padding: 16px 18px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.kpi strong { display: block; margin-top: 6px; font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }

/* Lists of invoices / servers */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.page a.row-link { display: flex; align-items: center; gap: 14px; color: var(--text); font-weight: 600; text-decoration: none; min-width: 0; }
.page a.row-link:hover { color: var(--accent); }
.row-link .small { font-weight: 400; }
.row-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius); background: var(--panel-2); color: var(--muted); }
.row-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* Key/value details */
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(7rem, 12rem) 1fr; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; }
.facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.total { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 18px; border-top: 1px solid var(--line); background: var(--panel-2); }
.total strong { font-size: 30px; font-weight: 600; letter-spacing: -.03em; }

.notice { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; }
.notice h2 { margin-top: 0; }
.notice p:last-child { margin-bottom: 0; }
.notice.strong { background: #fff7e0; border-color: #f0d48a; border-left: 4px solid var(--wait); }
.notice.ok { background: #e6f6ee; border-color: #b8e3cd; }
.secret { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 1.1rem; }
.pay-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 14px; }
.page .flash { padding: 10px 12px; margin: 0 0 16px; border-radius: var(--radius); }

.badge { padding: 3px 8px; border-radius: var(--radius); border: 1px solid var(--line); font-family: var(--font); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.badge--green { color: #1d7a52; background: #e6f6ee; border-color: #b8e3cd; }
.badge--red { color: #b8262b; background: #fdecec; border-color: #f4c3c5; }
.badge--amber { color: #9a6213; background: #fdf3e2; border-color: #f0d48a; }

/* Extra button styles the template doesn't have */
.page .btn, .header .btn { font-family: var(--font); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn--danger { background: var(--stop); color: #fff; }
.btn--danger:hover { background: #b8262b; color: #fff; }
.btn--paypal { background: #ffc439; color: #111; }
.btn--paypal:hover { background: #f2b52a; color: #111; }
.btn--btc { background: #f7931a; color: #fff; }
.btn--btc:hover { background: #e2850f; color: #fff; }
.page a.btn--primary, .page a.btn--danger, .page a.btn--btc { color: #fff; }
.page a.btn--outline { color: var(--text); }

/* Forms */
.stack { display: grid; gap: 16px; }
.stack.tight { gap: 6px; margin-bottom: 10px; }
.page label { font-weight: 500; font-size: 14.5px; }
.page input[type=email], .page input[type=password], .page input[type=number], .page .stack select {
  display: block; width: 100%; margin-top: 6px; height: 42px; padding: 0 12px;
  font: 400 15px var(--font); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel);
  transition: border-color .15s, box-shadow .15s;
}
.page input:focus, .page .stack select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 72, 77, .15); }
.check { font-weight: 400; display: flex; gap: 10px; align-items: flex-start; }
.page .check { font-weight: 400; }
.check input { margin-top: .3em; flex: none; accent-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
details.danger { padding: 14px 0; border-top: 1px solid var(--line); }
details.danger:first-child { border-top: 0; padding-top: 0; }
details.danger summary { cursor: pointer; font-weight: 600; }
details.danger .stack { margin-top: 14px; max-width: 30rem; }
.spaced { margin-top: 10px; }
.inline-confirm { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

.auth, .card-narrow { max-width: 440px; margin: 12px auto 0; box-shadow: var(--shadow); }
.auth h1, .card-narrow h1 { font-size: 26px; }
.auth h1 + .small { margin: 6px 0 20px; }

/* Status lights */
.state { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14.5px; }
.state.big { font-size: 15px; margin: 10px 0 0; }
.led { width: 8px; height: 8px; border-radius: 50%; background: #9a9eb8; flex: none; }
.led.on { background: var(--on); box-shadow: 0 0 0 3px rgba(47, 182, 124, .2); }
.led.wait { background: var(--wait); box-shadow: 0 0 0 3px rgba(229, 153, 43, .2); }
.led.stop { background: var(--stop); box-shadow: 0 0 0 3px rgba(229, 72, 77, .2); }

/* Tables */
.table-wrap { overflow-x: auto; }
.page table { border-collapse: collapse; width: 100%; font-size: 14px; }
.page th, .page td { text-align: left; padding: 12px 18px; border-top: 1px solid var(--line); vertical-align: top; }
.page thead th { border-top: 0; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* Legal pages */
.prose { max-width: 44rem; }
.prose h1 { margin-bottom: 20px; }
.prose h2 { margin-top: 32px; }
.prose li { margin-bottom: .4rem; }

@media (max-width: 640px) {
  .page__inner { padding: 0 16px; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .panel__foot { flex-wrap: wrap; }
  .panel__foot .btn--lg { width: 100%; }
}

.page .btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.panel__foot--links { font-family: var(--font); font-size: 14px; letter-spacing: 0; text-transform: none; }
.auth .panel__body { padding: 26px 24px 24px; }
.auth .panel__foot { padding: 14px 24px 16px; }
/* Buttons that are real <button>s or sit inside mono strips keep the normal button look */
button.btn--ghost, button.btn--outline { background: transparent; }
button.btn--ghost { border-color: transparent; }
.page .btn, .header .btn, .panel__foot .btn { font-family: var(--font); text-transform: none; letter-spacing: normal; }
.page h2.label { font-size: 11.5px; letter-spacing: .14em; margin: 0 0 10px; }
@media (max-width: 960px) {
  .header__actions form.hide-sm { display: none; }
}

/* ---------- Grids that adapt to however many plans / systems the store sells ---------- */
.plans { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.os-grid--fit { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); }
.os-grid--fit .os:nth-child(n) { border: 0; background: var(--panel); }
.os-grid--fit .os:hover { background: var(--panel-2); }
@media (max-width: 640px) {
  .plans { grid-template-columns: 1fr; }
  .os-grid--fit { grid-template-columns: repeat(2, 1fr); }
}

/* Configurator polish */
.region-picker__options--plans { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.configurator__summary li.is-stacked { flex-direction: column; gap: 4px; }
.configurator__summary li.is-stacked b { text-align: left; font-family: var(--mono); font-size: 12.5px; font-weight: 400; line-height: 1.6; color: var(--muted); }

/* Expandable "danger" sections styled like the FAQ rows */
details.danger summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
details.danger summary::-webkit-details-marker { display: none; }
details.danger summary::after {
  content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 16px; font-weight: 400; color: var(--muted);
  transition: transform .25s, color .2s, border-color .2s;
}
details.danger[open] summary::after { transform: rotate(45deg); color: var(--accent); border-color: var(--accent); }
details.danger summary:hover { color: var(--accent); }

/* Footer stays at the bottom on short pages */
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1 0 auto; }
.card-narrow { margin-top: 24px; }
.card-narrow .panel__body { padding: 28px 26px; }
.card-narrow h1 { margin-bottom: 10px; }

/* Legal pages sit in a panel like the rest of the store */
.prose { max-width: 820px; margin: 0 auto; padding: 36px 40px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.prose h2 { font-size: 18px; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--text); line-height: 1.7; }
@media (max-width: 640px) { .prose { padding: 24px 18px; } }
.kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 640px) { .kpi strong { font-size: 24px; } }

/* Server types (pricing tabs + configurator) */
.plan[hidden], #builder label[hidden] { display: none !important; }
.pricing-controls { justify-content: flex-start; gap: 14px 24px; }
.tier-note { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tabs button { font-family: var(--mono); }

/* ---------- Server-type switch (pricing + configurator): brighter, with a red selected state ---------- */
.tabs[data-tier-tabs] { gap: 4px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--text) 4%, transparent); }
.tabs[data-tier-tabs] button {
  padding: 10px 20px; border: 1px solid var(--line-strong); border-radius: 2px; background: transparent;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); opacity: .8; transition: background .15s, border-color .15s, color .15s, opacity .15s, box-shadow .15s;
}
.tabs[data-tier-tabs] button + button { border-left: 1px solid var(--line-strong); }
.tabs[data-tier-tabs] button:hover { opacity: 1; border-color: var(--accent); color: var(--accent); }
.tabs[data-tier-tabs] button[aria-selected="true"] {
  opacity: 1; background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 6px 20px -8px var(--accent);
}
.tabs[data-tier-tabs] button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tier-field { display: grid; gap: 12px; margin-bottom: 28px; }
.tier-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
@media (max-width: 640px) {
  .tabs[data-tier-tabs] { display: flex; width: 100%; }
  .tabs[data-tier-tabs] button { flex: 1; padding: 10px 8px; }
}

/* Windows notes */
.os__note { display: block; margin-top: 2px; color: var(--accent) !important; }
.os-hint { margin: 2px 0 0; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; color: var(--text); background: color-mix(in srgb, var(--wait) 12%, transparent); border: 1px solid color-mix(in srgb, var(--wait) 35%, transparent); border-radius: var(--radius); }
.os-hint[hidden] { display: none; }
