/* EmilVenn.com — consent banner, visually aligned with the book/site identity. */
.consent-banner[hidden] { display: none !important; }

.consent-banner {
  position: fixed;
  z-index: 10000;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  color: #161412;
  background: #f7f2e8;
  border: 1px solid rgba(140, 31, 36, 0.42);
  box-shadow: 0 14px 46px rgba(24, 20, 17, 0.18);
  font-family: Georgia, 'Times New Roman', serif;
}

.consent-banner::before {
  content: '';
  display: block;
  height: 3px;
  background: #8c1f24;
}

.consent-banner__inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.consent-banner__copy h2 {
  margin: 0 0 7px;
  font: 600 1.05rem/1.25 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.02em;
}

.consent-banner__copy p {
  margin: 0;
  max-width: 74ch;
  font-size: 0.98rem;
  line-height: 1.55;
}

.consent-banner__state {
  min-height: 0;
  margin-top: 5px !important;
  color: #6f675f;
  font-size: 0.86rem !important;
}

.consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}

.consent-button {
  appearance: none;
  border: 1px solid #8c1f24;
  border-radius: 0;
  padding: 11px 14px;
  min-height: 44px;
  cursor: pointer;
  font: 600 0.86rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0.015em;
}

.consent-button--primary {
  color: #fff;
  background: #8c1f24;
}

.consent-button--secondary {
  color: #541417;
  background: transparent;
}

.consent-button:hover,
.consent-button:focus-visible,
.consent-policy-link:focus-visible {
  outline: 3px solid rgba(140, 31, 36, 0.24);
  outline-offset: 2px;
}

.consent-policy-link {
  padding: 10px 4px;
  color: #541417;
  font: 600 0.84rem/1.2 system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-underline-offset: 3px;
}

.consent-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 760px) {
  .consent-banner {
    left: 0;
    right: 0;
    bottom: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .consent-banner__inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px max(18px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }

  .consent-banner__actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .consent-button,
  .consent-policy-link {
    width: 100%;
    text-align: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .consent-banner:not([hidden]) {
    animation: consent-rise 180ms ease-out;
  }

  @keyframes consent-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
