/* ============================================================================
   Maritsa — consent banner styles
   Built 04 August 2026. Category rows added 10 August 2026.
   Loaded by every page; the banner only renders when assets/consent.js has a
   non-essential vendor to ask about and the visitor has not yet answered.

   Reject All and Accept All are deliberately IDENTICAL: same width, same fill,
   same type, same contrast. Only the label differs, and Reject is listed
   first. The usual pattern of a solid Accept beside a ghosted Reject is
   exactly the nudge regulators have taken issue with, and there is nothing to
   gain here from winning a consent we would then have to defend.
   DO NOT RESTYLE ONE OF THEM.

   The per-category checkboxes live on a SECOND layer, behind "Choose what to
   allow", added 10 August 2026. Layer one therefore carries three controls,
   not five. This is a legitimate hierarchy and a common one: Accept All may be
   primary relative to Choose, because Choose is not a rejection route. It may
   NOT be primary relative to Reject All, which is why those two remain
   identical and side by side. The ICO wrote to the UK's most-visited sites in
   2024 about precisely that pattern.

   "Save my choices" only appears once the second layer is open.
   ========================================================================= */

.mc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: #F2ECD8;                 /* parchment */
  color: #2C3B1F;                      /* grove */
  border-top: 3px solid #C8960C;       /* harvest */
  box-shadow: 0 -14px 40px rgba(28, 34, 20, 0.18);
  transform: translateY(100%);
  transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
  font-family: 'DM Sans', 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  max-height: 92vh;
  overflow-y: auto;
}

.mc-banner.mc-in {
  transform: translateY(0);
}

.mc-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.mc-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.mc-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
  color: #2C3B1F;
}

.mc-body {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 62ch;
  color: #3A4A2A;
}

.mc-body strong {
  font-weight: 700;
  color: #2C3B1F;
}

.mc-link {
  color: #2C3B1F;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  white-space: nowrap;
}

.mc-link:hover,
.mc-link:focus-visible {
  color: #C8960C;
}

/* ---- second layer -------------------------------------------------------
   One row per purpose. Boxes are rendered unchecked by consent.js and are
   never pre-ticked. The hit area is the whole label, not just the 18px box,
   because a checkbox you have to aim at is its own kind of dark pattern.    */

.mc-choose {
  appearance: none;
  margin: 0.9rem 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  color: #2C3B1F;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

.mc-choose::after {
  content: ' \203A';
  text-decoration: none;
}

.mc-choose:hover,
.mc-choose:focus-visible {
  color: #C8960C;
}

.mc-choose[hidden] {
  display: none;
}

.mc-save[hidden],
.mc-cats[hidden] {
  display: none;
}

.mc-cats {
  margin: 1.1rem 0 0;
  display: grid;
  gap: 0.55rem;
  max-width: 62ch;
}

.mc-cat {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(44, 59, 31, 0.18);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.mc-cat:hover {
  border-color: rgba(44, 59, 31, 0.4);
}

.mc-cat:focus-within {
  outline: 3px solid #C8960C;
  outline-offset: 2px;
}

.mc-check {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.1rem 0 0;
  accent-color: #2C3B1F;
  cursor: pointer;
}

.mc-cat-text {
  display: block;
  min-width: 0;
}

.mc-cat-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #2C3B1F;
  margin-bottom: 0.15rem;
}

.mc-cat-why {
  display: block;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #3A4A2A;
}

.mc-cat-vendor {
  color: #5C3D1E;
}

/* ---- actions ----------------------------------------------------------- */

.mc-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  width: 21rem;
}

.mc-btn {
  /* Identical treatment for both. See the note at the top of this file. */
  appearance: none;
  flex: 1 1 9rem;
  min-width: 9rem;
  padding: 0.85rem 1.6rem;
  border: 2px solid #2C3B1F;
  border-radius: 2px;
  background: #2C3B1F;
  color: #F2ECD8;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.mc-btn:hover {
  background: #C8960C;
  border-color: #C8960C;
  color: #2C3B1F;
}

.mc-btn:focus-visible {
  outline: 3px solid #C8960C;
  outline-offset: 3px;
}

.mc-save {
  appearance: none;
  flex: 1 1 100%;
  padding: 0.6rem 0.5rem;
  border: 1px solid rgba(44, 59, 31, 0.35);
  border-radius: 2px;
  background: transparent;
  color: #2C3B1F;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}

.mc-save:hover {
  border-color: #C8960C;
  color: #5C3D1E;
}

.mc-save:focus-visible {
  outline: 3px solid #C8960C;
  outline-offset: 3px;
}

/* Footer / in-page withdrawal trigger */
.mc-settings {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.mc-settings:hover,
.mc-settings:focus-visible {
  color: #C8960C;
}

@media (max-width: 860px) {
  .mc-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.35rem 1.25rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
  }

  .mc-actions {
    width: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .mc-btn {
    min-width: 0;
    width: 100%;
    padding: 0.95rem 0.75rem;
  }

  .mc-save {
    grid-column: 1 / -1;
  }

  .mc-body {
    font-size: 0.86rem;
  }

  .mc-cats {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mc-banner {
    transition: none;
  }
}
