/*
 * OCA brand colours for the Wagtail admin.
 *
 * Wagtail derives every shade (hover, active, light tints) from these
 * hue / saturation / lightness triples, so only the base values are set here.
 * Values come from the OC Alternative Energy logo (catalogue/static/ocacms/logo.png):
 *   primary   #012455  logo navy               → sidebar and header surfaces
 *   secondary #077200  logo green, one step darker → buttons, links, active states
 *                      (the logo's own #088800 only just passes AA with white text: 4.6:1;
 *                       this is 6.2:1, so Wagtail's derived hover shades stay readable)
 */
:root {
  --w-color-primary-hue: 215;
  --w-color-primary-saturation: 97.7%;
  --w-color-primary-lightness: 16.9%;

  --w-color-secondary-hue: 116.3;
  --w-color-secondary-saturation: 100%;
  --w-color-secondary-lightness: 22.4%;

  /* Focus ring: the logo's orange bolt (#f87800) darkened until it clears the 3:1
     non-text contrast minimum on both white (4.3:1) and the navy sidebar (3.5:1). */
  --w-color-focus: #c25e00;
}

/* Sidebar logo: the round "O" emblem with the lightning bolt. Wagtail's slot is
   110px (40px when the sidebar is collapsed) — built for its bird — so scale within it. */
.oca-admin-mark {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto;
}

/* Login page: full-colour logo above the form. */
.oca-login-logo {
  display: block;
  width: min(300px, 75vw);
  height: auto;
  margin: 2.5rem auto 0;
}

/* Product / category thumbnails in the listings. */
.oca-thumb {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

/* Dashboard: "Your store" shortcut cards (catalogue/wagtail_hooks.py → StorePanel). */
.oca-store-panel {
  margin-bottom: 2.5rem;
}
.oca-store-panel__heading {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
}
.oca-store-panel__intro {
  margin: 0.25rem 0 1.25rem;
  color: var(--w-color-text-meta);
}
.oca-store-panel__cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
.oca-store-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--w-color-border-furniture);
  border-top: 3px solid var(--w-color-secondary);
  border-radius: 0.75rem;
  background: var(--w-color-surface-page);
}
.oca-store-card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.oca-store-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.6rem;
  background: var(--w-color-secondary-50);
  color: var(--w-color-secondary);
}
.oca-store-card__icon .icon {
  width: 1.4rem;
  height: 1.4rem;
}
.oca-store-card__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
}
.oca-store-card__address {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--w-color-text-meta);
}
.oca-store-card__description {
  flex: 1;
  margin: 0.75rem 0 1rem;
}
.oca-store-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* The dashboard's "Search all pages" box searches Wagtail's page tree, which this
   site doesn't use (products, categories and pages live under Store). */
.w-dashboard > header form[role='search'] {
  display: none;
}

/* Quote request / quotation detail pages (quotes/templates/quotes/admin/). */
.oca-inspect {
  max-width: 60rem;
}
.oca-inspect h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}
.oca-inspect__summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--w-color-border-furniture);
  border-top: 3px solid var(--w-color-secondary);
  border-radius: 0.75rem;
}
.oca-inspect__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--w-color-text-meta);
  margin-bottom: 0.25rem;
}
.oca-inspect__meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--w-color-text-meta);
}
.oca-inspect__notes {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0.75rem;
  background: var(--w-color-secondary-50);
}
.oca-inspect__notes p {
  margin: 0;
}
.oca-inspect__heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.oca-inspect__quotations,
.oca-inspect__section {
  margin-bottom: 2rem;
}
.oca-inspect__section dl {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr;
  margin: 0;
  border-top: 1px solid var(--w-color-border-furniture);
}
.oca-inspect__section dt,
.oca-inspect__section dd {
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--w-color-border-furniture);
}
.oca-inspect__section dt {
  color: var(--w-color-text-meta);
}
.oca-quote-items .oca-num {
  text-align: end;
  white-space: nowrap;
}
.oca-quote-items tfoot td {
  border: 0;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}
.oca-quote-items .oca-total td {
  font-weight: 700;
  font-size: 1.05rem;
  border-top: 2px solid var(--w-color-primary);
}

.oca-nowrap {
  white-space: nowrap;
}
.oca-inspect__heading-row .button {
  width: auto;
  flex: none;
}

/* Running total on the quotation form (quotation-form.js). */
.oca-live-total {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  max-width: 28rem;
  border: 1px solid var(--w-color-border-furniture);
  border-top: 3px solid var(--w-color-secondary);
  border-radius: 0.75rem;
}
.oca-live-total h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.oca-live-total dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1.5rem;
  margin: 0;
}
.oca-live-total dd {
  margin: 0;
  text-align: end;
  font-variant-numeric: tabular-nums;
}
.oca-live-total .oca-live-total__grand {
  font-weight: 700;
  font-size: 1.1rem;
  padding-top: 0.4rem;
  border-top: 2px solid var(--w-color-primary);
}
