/* ═══════════════════════════════════════════════════════════════
   brasa — cookies.css
   Page-blocking consent: dark overlay + corner card with preferences.
   ═══════════════════════════════════════════════════════════════ */

.cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(10, 10, 10, 0.55);
}

.cookie-banner {
  position: fixed;
  z-index: 9999;
  right: var(--page-gutter);
  bottom: calc(var(--page-gutter) + env(safe-area-inset-bottom, 0px));
  left: auto;
  width: min(380px, calc(100vw - var(--page-gutter) * 2));
  padding: clamp(22px, 4vw, 28px) clamp(20px, 3.5vw, 26px);
  background: var(--color-white);
  border: 1px solid var(--color-grey-light);
  box-shadow: 0 12px 48px rgba(10, 10, 10, 0.18);
}

html.cookie-banner-open body {
  overflow: hidden;
}

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
}

.cookie-banner__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 2px;
}

.cookie-banner__logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(40px, 11vw, 48px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--color-black);
}

.cookie-banner__kicker {
  margin: 6px 0 0;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: #8A8A8A;
}


.cookie-banner__prefs-toggle {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: -6px;
  padding: 4px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: #8A8A8A;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner__prefs-toggle::after {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.cookie-banner--prefs-open .cookie-banner__prefs-toggle::after {
  transform: rotate(-135deg) translateY(1px);
}

.cookie-banner__prefs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 2px;
  border-top: 1px solid #EDEDED;
}

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

.cookie-banner__text {
  margin: 0;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: #4A4A4A;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.cookie-banner__text a {
  color: var(--color-black);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-banner__btn {
  width: 100%;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  padding: 14px 20px;
  border: 1px solid var(--color-black);
  cursor: pointer;
  text-align: center;
}

.cookie-banner__btn--primary {
  background: var(--color-black);
  color: var(--color-white);
}

.cookie-banner__btn--ghost {
  background: transparent;
  color: var(--color-black);
}

.cookie-banner__btn:focus-visible,
.cookie-banner__prefs-toggle:focus-visible {
  outline: 2px solid var(--color-royal-blue);
  outline-offset: 2px;
}

/* ── Preferences ── */
.cookie-prefs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.cookie-prefs__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid #EDEDED;
}

.cookie-prefs__row:first-child {
  border-top: none;
}

.cookie-prefs__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cookie-prefs__name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-black);
}

.cookie-prefs__desc {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 300;
  line-height: 1.5;
  color: #8A8A8A;
}

.cookie-prefs__locked {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: #B0B0B0;
  white-space: nowrap;
}

/* ── Toggle ── */
.cookie-toggle {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}

.cookie-toggle__input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.cookie-toggle__track {
  display: block;
  width: 40px;
  height: 22px;
  background: #DCDCDC;
  position: relative;
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--color-white);
}

.cookie-toggle__input:checked + .cookie-toggle__track {
  background: var(--color-black);
}

.cookie-toggle__input:checked + .cookie-toggle__track::after {
  left: auto;
  right: 3px;
}

.cookie-toggle__input:focus-visible + .cookie-toggle__track {
  outline: 2px solid var(--color-royal-blue);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .cookie-banner {
    right: var(--page-gutter);
    left: var(--page-gutter);
    bottom: calc(var(--page-gutter) + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: none;
    padding: clamp(22px, 5vw, 28px) clamp(20px, 4vw, 24px);
    box-shadow: 0 12px 40px rgba(10, 10, 10, 0.18);
  }
}
