/* ==========================================================================
   Princess Auto — vendor support codes
   Palette taken from the February 2026 Colour Guide. HEX values are the
   authority here, since the guide specifies HEX for all digital use.
   ========================================================================== */

:root {
  /* Primary */
  --harvey-blue: #002c4e;
  --royal-blue: #285882;
  --anvil-grey: #757982;
  --steel-grey: #888b95;
  --concrete-grey: #c0c6d6;

  /* Accents — used sparingly, per the guide */
  --accent-blue: #00a9e8;
  --diesel-yellow: #ffd200;
  --asphalt-black: #101921;

  /* Category colour, borrowed only for the "code expired" state */
  --surplus-red: #9e2b33;

  --paper: #f4f6f9;
  --white: #ffffff;

  /* Industrial sans for headings and labels; the system stack keeps this
     dependency-free for an air-gapped internal host. Drop the brand
     typeface into public/fonts and add an @font-face rule to override. */
  --font-display: 'Helvetica Neue', 'Arial Narrow', Arial, system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  --radius: 4px;
  --shadow-plate: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 18px 40px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--harvey-blue);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.on-dark {
  background: var(--harvey-blue);
  color: var(--white);
}

a {
  color: var(--royal-blue);
}

body.on-dark a {
  color: var(--accent-blue);
}

/* ------------------------------- masthead ------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 3px solid var(--diesel-yellow);
  background: var(--harvey-blue);
  color: var(--white);
}

.wordmark {
  display: flex;
  /* Centered, not baseline — baseline alignment looked fine at the old
     fixed 26px logo height, but with --pa-logo-scale able to push the logo
     up to 6x that, a baseline-aligned image would tower above the rule and
     the .sub text instead of sitting level with them. */
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 15px;
}

.wordmark img {
  /* --pa-logo-scale is set inline, per page, by pa_logo_scale_style_tag()
     in app/lib/bootstrap.php — sourced from PA_LOGO_SCALE (1-6, meaning
     100%-600%), defaulting to 3. The fallback value here (3) only matters
     if that inline <style> tag is ever missing from a page. */
  height: calc(26px * var(--pa-logo-scale, 3));
  width: auto;
  display: block;
}

.logo-link {
  /* Wraps the masthead logo so it links back to the root portal page.
     inline-flex keeps the anchor sized to exactly the image (no extra
     inline-element whitespace/line-height gap) and keeps it vertically
     centered alongside the rule and .sub text in .wordmark. */
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.logo-link:hover img,
.logo-link:focus-visible img {
  opacity: 0.85;
}

.wordmark .rule {
  width: 1px;
  height: 15px;
  background: var(--steel-grey);
}

.wordmark .sub {
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--concrete-grey);
  font-size: 12px;
}

.masthead-meta {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--concrete-grey);
  display: flex;
  align-items: center;
  gap: 14px;
}

/* -------------------------------- layout -------------------------------- */

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.shell.narrow {
  max-width: 460px;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--anvil-grey);
  margin: 0 0 8px;
}

body.on-dark .eyebrow {
  color: var(--concrete-grey);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
}

.lede {
  color: var(--anvil-grey);
  margin: 0 0 24px;
  max-width: 56ch;
}

body.on-dark .lede {
  color: var(--concrete-grey);
}

.card {
  background: var(--white);
  border: 1px solid var(--concrete-grey);
  border-radius: var(--radius);
  padding: 24px;
}

.card + .card {
  margin-top: 20px;
}

/* -------------------------------- forms --------------------------------- */

label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--anvil-grey);
  margin-bottom: 6px;
}

body.on-dark label {
  color: var(--concrete-grey);
}

input,
select {
  width: 100%;
  padding: 11px 12px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--harvey-blue);
  background: var(--white);
  border: 1px solid var(--steel-grey);
  border-radius: var(--radius);
}

input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent-blue);
  outline-offset: 2px;
}

.field {
  margin-bottom: 18px;
}

.hint {
  font-size: 13px;
  color: var(--anvil-grey);
  margin: 6px 0 0;
}

button {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--harvey-blue);
  color: var(--white);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

button:hover:not(:disabled) {
  background: var(--royal-blue);
}

button:disabled {
  background: var(--concrete-grey);
  color: var(--anvil-grey);
  cursor: not-allowed;
}

button.primary-yellow {
  background: var(--diesel-yellow);
  color: var(--asphalt-black);
}

button.primary-yellow:hover:not(:disabled) {
  background: #ffdc3d;
}

button.ghost {
  background: transparent;
  color: var(--royal-blue);
  border-color: var(--concrete-grey);
}

button.ghost:hover:not(:disabled) {
  background: var(--paper);
  color: var(--harvey-blue);
}

button.small {
  padding: 7px 12px;
  font-size: 11px;
}

button.block {
  width: 100%;
}

/* ------------------------------- messages ------------------------------- */

.notice {
  border-left: 4px solid var(--royal-blue);
  background: #eef2f7;
  color: var(--harvey-blue);
  padding: 12px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
  margin-bottom: 18px;
}

.notice.error {
  border-left-color: var(--surplus-red);
  background: #f8edee;
  color: #6d1f25;
}

.notice.good {
  border-left-color: #2f6b3a;
  background: #edf5ee;
  color: #22512b;
}

.notice[hidden] {
  display: none;
}

/* -------------------------------- tables -------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--anvil-grey);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid var(--concrete-grey);
  white-space: nowrap;
}

td {
  padding: 10px;
  border-bottom: 1px solid #e4e8f0;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 2px;
  background: var(--concrete-grey);
  color: var(--harvey-blue);
}

.tag.on {
  background: #d8ecdb;
  color: #22512b;
}

.tag.off {
  background: #f0dcde;
  color: #6d1f25;
}

.tag.warn {
  background: var(--diesel-yellow);
  color: var(--asphalt-black);
}

.footnote {
  margin-top: 32px;
  font-size: 12px;
  color: var(--anvil-grey);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
