/* Eden tickets SPA - SPA-only overrides.
 *
 * The list view, cards, filters, pagination, page-panel, empty state,
 * status badges and avatar are all styled by /ticket/static/site.css
 * (shared with the staff-only /ticket/help and /ticket/snippets pages
 * that still ship as plain HTML).
 *
 * What lives here:
 *   - Native <select> styling. The /snippets page uses a custom
 *     button+listbox widget that needs a JS keyboard binder; the SPA
 *     uses native <select>, which the browser themes white by default.
 *     A few lines bring it in line with the dark palette.
 */

.select-control select {
  background: var(--panel-quiet);
  color: var(--text);
  border: 1px solid var(--accent-muted);
  border-radius: 4px;
  padding: 6px 28px 6px 12px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  min-width: 130px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent-light) 50%),
    linear-gradient(-45deg, transparent 50%, var(--accent-light) 50%);
  background-position:
    calc(100% - 14px) 14px,
    calc(100% - 9px) 14px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.select-control select:hover { border-color: var(--accent-light); }
.select-control select:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.select-control select option { background: #0a3230; color: var(--text); }

/* ─────────────────────────────────────────────────────────────────
 * phpBB-chrome overrides. When mounted at /tickets the SPA lives
 * inside Renegade's <body id="phpbb" class="body-layout-Boxed">.
 * Renegade's stylesheet loads after site.css and clobbers a few
 * things; re-establish them at higher specificity here.
 * Selectors keyed on body#phpbb (1,0,0,2) so they only fire inside
 * the phpBB wrap, never on the standalone /ticket/ticket.html.
 * ─────────────────────────────────────────────────────────────── */

/* Use Renegade's site-wide background (edn_bg.jpg, injected as a
 * full-screen fixed <div> at z-index: -1). Renegade's body /
 * #wrap / #page-body have opaque dark backgrounds by default that
 * cover that bg, so make them transparent here so the same backdrop
 * the rest of the site uses shows through behind the SPA. */
body#phpbb,
body#phpbb #wrap,
body#phpbb #page-body,
body#phpbb .content,
body#phpbb .pages-content,
body#phpbb main {
  background: transparent !important;
}

/* The SPA's main has max-width: 980px from site.css for the
 * standalone shell. Inside phpBB drop that cap so it inherits the
 * surrounding content width; small horizontal padding keeps the
 * panel a hair narrower than the topbar so it doesn't bleed past. */
body#phpbb main {
  max-width: none;
  margin: 0;
  padding: 0 12px;
}

/* Renegade's h1 / h2 are uppercased and ~36px / ~26px - our SPA
 * was tuned for the 24px / 17px from site.css. Restore at higher
 * specificity so both Renegade-themed pages and the SPA can coexist. */
body#phpbb h1.page-title {
  font-size: 22px;
  margin: 0 0 8px;
}
body#phpbb .card h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  /* Lift 3px so the title visually centres against the GAME/OPEN
   * pills below - Rajdhani's x-height sits a hair low for this
   * card geometry. */
  margin: -3px 0 0;
}

/* Prompts page (/tickets?prompts) inside phpBB chrome - Renegade
 * upsizes h2 + p so the per-card title, blurb, and the intro
 * paragraph render too big. Re-pin them to the original site.css
 * values at body#phpbb specificity. */
body#phpbb .snippet-help {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 18px;
}
body#phpbb .prompt-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
body#phpbb .prompt-blurb {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 12px;
}

/* Snippets manager (/tickets?snippets) inside phpBB chrome - same
 * Renegade-h2 / large-p story; pin the new-snippet summary, the
 * per-card name pill, and the "by ..." meta line back to site.css
 * sizes. */
body#phpbb details.snippet-new summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}
body#phpbb .snippet-card-header {
  align-items: baseline;
}
body#phpbb .snippet-name {
  font-size: 13px;
  letter-spacing: 0.3px;
  text-transform: none;
}
body#phpbb .snippet-meta {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
body#phpbb .snippet-form .field label,
body#phpbb .snippet-form-status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
}
/* The action row has three flex children (Save, Delete, status
 * span) so justify-content:space-between from site.css ends up
 * with Delete in the middle. Push Delete to the right edge with
 * an auto-margin instead. */
body#phpbb .snippet-card-actions [data-snippet-delete] {
  margin-left: auto;
}

/* Help / setup guide pages (/tickets?help, /tickets?help=setup) -
 * raw HTML pulled from staff-guide.html / setup-guide.html and
 * injected inside body#phpbb. Renegade upsizes h1-h3 and stretches
 * letter-spacing, so reset to the doc-* sizes from site.css. */
body#phpbb .doc-page h1,
body#phpbb .doc-body h1 {
  font-size: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 14px;
  color: var(--accent-light);
}
body#phpbb .doc-page h2,
body#phpbb .doc-body h2 {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 22px 0 10px;
  color: var(--accent-light);
}
body#phpbb .doc-page h3,
body#phpbb .doc-body h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 16px 0 6px;
  color: var(--text);
}
body#phpbb .doc-page p,
body#phpbb .doc-body p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 12px;
}
body#phpbb .doc-page li,
body#phpbb .doc-body li {
  font-size: 14px;
  line-height: 1.55;
}
body#phpbb .doc-page table {
  font-size: 13px;
}

/* phpBB ships its own .pagination styling that conflicts with the
 * SPA's flat <a>/<span> markup - it expects a <ul>/<li> tree and
 * floats the block right, which makes our buttons overlap the last
 * card. Restore the centred-flex layout the SPA was designed for. */
body#phpbb .pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 22px 0 4px;
  padding: 0;
  float: none;
  position: static;
  background: none;
  border: none;
}
body#phpbb .pagination a,
body#phpbb .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 6px 10px;
  border-radius: 4px;
  background: none;
  float: none;
}

/* Match the dark glassy panel style used by /stats and other phpBB-
 * chromed pages: black at 25% with a single accent border on the
 * left edge, instead of the standalone view's teal-gradient panel
 * with a full border on every side. Standalone /ticket/ticket.html
 * keeps the original look since these rules are body#phpbb-scoped. */
body#phpbb .page-panel {
  background: rgba(0, 0, 0, 0.25);
  border: none;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 20px 24px;
}
body#phpbb .detail {
  background: rgba(0, 0, 0, 0.25);
  border: none;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
}
