/*
 * Cookie-consent banner styles. Served from public/ (NOT bundled by Vite) and
 * linked from the document head ONLY on builds where analytics is active (a
 * measurement id configured), so it never touches the live document while
 * analytics is off. Same-origin, so it sits inside the site CSP (style-src
 * 'self' 'unsafe-inline'; this file is 'self').
 *
 * Brand: Agun dark. Near-black surface, light ink, steel outline.
 * Equal-weight consent (legal review 2026-10-13 item B4): Accept, Reject and
 * Settings are IDENTICAL in size, colour, weight and font, as are the panel's
 * Save choices / Accept all / Reject all; there is no filled Accept vs ghost
 * Reject. 16px type floor, WCAG AA contrast on the dark theme, works at phone
 * width.
 */
.ag-cookie {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  background: #0d0f13;
  color: var(--ag-ink-strong);
  border-top: 1px solid rgba(124, 147, 181, 0.5);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.55);
  padding: 18px clamp(16px, 5vw, 56px);
}

.ag-cookie[hidden] {
  display: none;
}

.ag-cookie__inner {
  max-width: 1240px;
  margin: 0 auto;
}

.ag-cookie__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
}

.ag-cookie__bar[hidden] {
  display: none;
}

.ag-cookie__text {
  margin: 0;
  flex: 1 1 320px;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 16px; /* type floor: never below 16px in the banner */
  line-height: 1.6;
  color: var(--ag-ink-strong);
}

.ag-cookie__text a {
  color: var(--ag-steel);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ag-cookie__text a:hover,
.ag-cookie__text a:focus-visible {
  color: var(--ag-ink-strong);
}

.ag-cookie__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ag-cookie__actions--panel {
  margin-top: 20px;
  justify-content: flex-end;
}

/* ONE button style for every consent button: identical background, colour,
   font, weight and box size. No primary/secondary split (no dark pattern).
   Ink-strong text on the steel-tinted surface is high contrast (AA pass). */
.ag-cookie__btn {
  font-family: 'Saira', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 12px 26px;
  border-radius: 2px;
  cursor: pointer;
  min-width: 120px;
  text-align: center;
  border: 1px solid var(--ag-steel);
  background: rgba(124, 147, 181, 0.14);
  color: var(--ag-ink-strong);
  transition: background 0.15s ease;
}

.ag-cookie__btn:hover,
.ag-cookie__btn:focus-visible {
  background: rgba(124, 147, 181, 0.28);
}

.ag-cookie__btn:focus-visible {
  outline: 2px solid var(--ag-ink-strong);
  outline-offset: 2px;
}

/* Settings panel. */
.ag-cookie__panel {
  padding-top: 4px;
}

.ag-cookie__panel[hidden] {
  display: none;
}

.ag-cookie__paneltitle {
  margin: 0 0 16px;
  font-family: 'Saira', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ag-ink-strong);
}

.ag-cookie__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ag-cookie__rowtext {
  display: block;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ag-ink);
  max-width: 78ch;
}

.ag-cookie__rowtext strong {
  color: var(--ag-ink-strong);
  font-weight: 600;
}

.ag-cookie__toggle {
  display: inline-flex;
  align-items: flex-start;
  flex: 0 0 auto;
}

.ag-cookie__toggle input[type='checkbox'] {
  width: 22px;
  height: 22px;
  accent-color: var(--ag-steel);
  cursor: pointer;
}

.ag-cookie__toggle input[type='checkbox']:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.ag-cookie__toggle input[type='checkbox']:focus-visible {
  outline: 2px solid var(--ag-ink-strong);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .ag-cookie__actions {
    width: 100%;
  }
  .ag-cookie__btn {
    flex: 1 1 auto;
  }
  .ag-cookie__row {
    flex-direction: column;
    gap: 12px;
  }
  .ag-cookie__toggle {
    align-items: flex-start;
    flex-direction: row-reverse;
    gap: 10px;
  }
}
