/* Wake's consent banner in the Pushreel look (prototype artboards "Main" and "ConsentPhone").
   Wake writes the markup (public/assets/wake/consent.js); this file only restyles its classes.
   Banner: text left, Settings · Decline · Accept all right; Decline and Accept look the same.
   Settings: a centred dialog with switches. Phones: a bottom sheet. */
.wake-consent {
  --c-bg: #fff; --c-fg: var(--ink);
  left: 56px; right: 56px; bottom: 32px; max-width: 1328px; margin: 0 auto; padding: 24px 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title actions" "text actions" "privacy actions"; column-gap: 32px; row-gap: 6px; align-items: center;
  background: #fff; color: var(--ink); border: var(--bw) solid var(--ink); border-radius: 18px;
  box-shadow: 0 0 0 6px rgba(255, 42, 138, .12); font: 16px/1.5 var(--f-text);
}
.wake-consent__title { grid-area: title; margin: 0; font: 800 28px/1.15 var(--f-display); }
.wake-consent__text { grid-area: text; margin: 0; opacity: 1; color: var(--ink-2); max-width: 760px; }
.wake-consent__actions { display: contents; }
.wake-consent__button, .wake-consent__actions > button.wake-consent__link {
  grid-area: actions; min-height: 48px; padding: 0 24px; border-radius: 999px; border: var(--bw) solid var(--ink);
  background: var(--ink); color: #fff; font: 800 16px/1 var(--f-text); cursor: pointer; text-decoration: none; text-align: center;
}
.wake-consent__actions > button.wake-consent__link { background: #fff; color: var(--ink); font-weight: 700; padding: 0 20px; }
.wake-consent__button:hover { background: #2a2540; }
.wake-consent__actions > button.wake-consent__link:hover { background: var(--volt-tint); }
/* Wake focuses "Accept all" when the banner opens; the ring stays neutral so it does not make Accept look stronger than Decline. */
.wake-consent__button:focus, .wake-consent__link:focus { outline: none; box-shadow: none; }
.wake-consent__button:focus-visible, .wake-consent__link:focus-visible { outline: 2px solid var(--ink-3); outline-offset: 3px; box-shadow: none; }
.wake-consent__actions > a.wake-consent__link { grid-area: privacy; justify-self: start; padding: 0; color: var(--rec-text); font-size: 16px; }
/* the three buttons sit side by side in one grid cell */
.wake-consent:not(:has(.wake-consent__list)) { grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "title b1 b2 b3" "text b1 b2 b3" "privacy b1 b2 b3"; column-gap: 10px; }
.wake-consent:not(:has(.wake-consent__list)) .wake-consent__text, .wake-consent:not(:has(.wake-consent__list)) .wake-consent__title { margin-right: 22px; }
.wake-consent:not(:has(.wake-consent__list)) .wake-consent__actions > button.wake-consent__link { grid-area: b1; }
.wake-consent:not(:has(.wake-consent__list)) .wake-consent__button:nth-child(1) { grid-area: b2; }
.wake-consent:not(:has(.wake-consent__list)) .wake-consent__button:nth-child(2) { grid-area: b3; }

/* Settings: centred dialog over a dimmed page */
.wake-consent:has(.wake-consent__list) {
  top: 50%; bottom: auto; left: 16px; right: 16px; transform: translateY(-50%); max-width: 620px; max-height: calc(100vh - 32px); overflow: auto;
  grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "title title title" "text text text" "list list list" "privacy privacy privacy" "b0 b1 b2";
  gap: 14px 10px; padding: 28px; box-shadow: 0 0 0 100vmax rgba(14, 10, 31, .45); animation: none;
}
.wake-consent:has(.wake-consent__list) .wake-consent__title { font-size: 30px; }
.wake-consent:has(.wake-consent__list) .wake-consent__button:nth-child(1) { grid-area: b0; }
.wake-consent:has(.wake-consent__list) .wake-consent__button:nth-child(2) { grid-area: b1; }
.wake-consent:has(.wake-consent__list) .wake-consent__actions > button.wake-consent__link { grid-area: b2; background: var(--ink); color: #fff; font-weight: 800; }
.wake-consent__list { grid-area: list; gap: 0; margin: 0; }
.wake-consent__row { display: flex; flex-direction: row-reverse; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.wake-consent__row b { display: block; font-weight: 800; font-size: 17px; }
.wake-consent__row small { display: block; margin-top: 4px; opacity: 1; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
/* checkboxes as switches */
.wake-consent__row input { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 52px; height: 30px; margin: 0; border-radius: 999px; border: var(--bw) solid var(--ink); background: var(--paper-3); cursor: pointer; }
.wake-consent__row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%; background: var(--ink); transition: left .15s; }
.wake-consent__row input:checked { background: var(--volt); }
.wake-consent__row input:checked::after { left: 25px; }
.wake-consent__row input:disabled { opacity: .55; cursor: not-allowed; }
.wake-consent__row input:focus-visible { outline: 3px solid var(--rec); outline-offset: 2px; }
/* WORKAROUND (Wake gap): Wake always offers "External media", also on a site without embeds.
   pushreel.dev embeds nothing, so the row is hidden. Rows: necessary, statistics, media, marketing. */
.wake-consent__row:nth-child(3) { display: none; }

@media (max-width: 900px) {
  /* phones and small tablets: a bottom sheet, Decline and Accept side by side, Settings below */
  .wake-consent, .wake-consent:not(:has(.wake-consent__list)), .wake-consent:has(.wake-consent__list) {
    left: 0; right: 0; bottom: 0; top: auto; transform: none; max-width: none; max-height: 92vh; overflow: auto;
    border-radius: 20px 20px 0 0; border-width: var(--bw) 0 0; padding: 22px 16px 24px;
    grid-template-columns: 1fr 1fr; grid-template-areas: "title title" "text text" "list list" "privacy privacy" "b0 b1" "b2 b2";
    gap: 12px 10px; box-shadow: 0 0 0 100vmax rgba(14, 10, 31, .35);
  }
  .wake-consent__title, .wake-consent:has(.wake-consent__list) .wake-consent__title { font-size: 26px; margin: 0 !important; }
  .wake-consent__text { font-size: 15px; margin: 0 !important; }
  .wake-consent .wake-consent__button:nth-child(1) { grid-area: b0 !important; }
  .wake-consent .wake-consent__button:nth-child(2) { grid-area: b1 !important; }
  .wake-consent .wake-consent__actions > button.wake-consent__link { grid-area: b2 !important; min-height: 44px; }
  .wake-consent__row small { display: none; }
  .wake-consent__row { align-items: center; padding: 12px 0; }
  .wake-consent__row b { font-size: 16px; font-weight: 700; }
}
