/*
 * Cookie consent banner. Colours, radius, width, font and stacking order reach
 * it as custom properties set by the renderer from the settings; the neutral
 * fallback after each comma only serves a banner whose renderer failed to set
 * one. Accept all, Reject all, Choose and Save share one class, so they always
 * look the same. Below 600px a card becomes a bottom sheet (the same
 * breakpoint as consent-banner.js).
 */
.nara-consent,
.nara-consent *,
.nara-consent *::before,
.nara-consent *::after {
  box-sizing: border-box;
}

.nara-consent {
  position: fixed;
  bottom: 16px;
  z-index: var(--nara-consent-z, 99990);
  width: calc(100% - 32px);
  max-width: var(--nara-consent-width, 420px);
  padding: 20px;
  border-radius: var(--nara-consent-radius, 4px);
  background: var(--nara-consent-bg, #fff);
  color: var(--nara-consent-text, #222);
  font-family: var(--nara-consent-font, inherit);
  font-size: 15px;
  line-height: 1.5;
  text-align: left;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
}

.nara-consent--card_left { left: 16px; }
.nara-consent--card_right { right: 16px; }

.nara-consent--bar {
  right: 0;
  bottom: 0;
  left: 0;
  width: auto;
  max-width: none;
  padding: 16px max(16px, calc((100% - 960px) / 2));
  border-radius: 0;
}

/* Static at the top of the page: it pushes the page down and can never cover a control. */
.nara-consent.nara-consent--inline {
  position: static;
  width: auto;
  max-width: none;
  padding: 16px max(16px, calc((100% - 960px) / 2));
  border-radius: 0;
  box-shadow: none;
}

.nara-consent.nara-consent--preview {
  position: relative;
  inset: auto;
  width: auto;
}

.nara-consent.nara-consent--preview.nara-consent--card_right { margin-left: auto; }
.nara-consent.nara-consent--preview.nara-consent--bar { max-width: none; }

@media (max-width: 600px) {
  .nara-consent:not(.nara-consent--inline):not(.nara-consent--preview) {
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-width: none;
    max-height: 85vh;
    padding: 16px;
    overflow-y: auto;
    border-radius: var(--nara-consent-radius, 4px) var(--nara-consent-radius, 4px) 0 0;
  }
}

.nara-consent [hidden] { display: none !important; }

.nara-consent:focus:not(:focus-visible) { outline: none; }

.nara-consent :focus-visible {
  outline: 3px solid var(--nara-consent-text, #222);
  outline-offset: 2px;
}

/* Two classes: a theme's heading rule such as ".elementor-kit-N h2" has one class and one element, and would win over a single class. */
.nara-consent .nara-consent__title {
  margin: 0 0 8px;
  color: inherit;
  font-family: var(--nara-consent-font, inherit);
  font-size: 0.95em;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.nara-consent__message,
.nara-consent__intro { margin: 0 0 12px; }

.nara-consent a {
  color: var(--nara-consent-link, currentColor);
  text-decoration: underline;
}

.nara-consent__gpc {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-left: 3px solid currentColor;
  font-size: 0.93em;
}

.nara-consent__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 14px;
  font-size: 0.93em;
}

.nara-consent__buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.nara-consent__btn {
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 2px solid var(--nara-consent-btn-bg, #222);
  border-radius: var(--nara-consent-radius, 4px);
  background: var(--nara-consent-btn-bg, #222);
  color: var(--nara-consent-btn-text, #fff);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.2;
  text-align: center;
  text-transform: none;
  cursor: pointer;
}

.nara-consent__btn:hover { text-decoration: underline; }

.nara-consent__cats {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
}

.nara-consent__cat {
  display: grid;
  grid-template-columns: 22px 1fr;
  column-gap: 10px;
  align-items: start;
}

.nara-consent__toggle {
  grid-row: 1 / span 3;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--nara-consent-btn-bg, #222);
}

.nara-consent__cat-name {
  grid-column: 2;
  font-weight: 700;
}

.nara-consent__cat-desc,
.nara-consent__providers {
  grid-column: 2;
  margin: 2px 0 0;
  font-size: 0.93em;
}

.nara-consent__providers { font-style: italic; }

.nara-consent-fab {
  position: fixed;
  bottom: 16px;
  z-index: var(--nara-consent-z, 99990);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--nara-consent-btn-bg, #222);
  color: var(--nara-consent-btn-text, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.nara-consent-fab--left { left: 16px; }
.nara-consent-fab--right { right: 16px; }

.nara-consent-fab:focus-visible {
  outline: 3px solid var(--nara-consent-btn-bg, #222);
  outline-offset: 3px;
}

/*
 * Everything the module puts on a page outside the banner card takes the same font
 * as the banner. The theme leaves <body> on the browser's serif, so a plain inherit
 * would print Times here; the controller sets the variable on <html>.
 */
.nara-consent-settings-footer,
.nara-consent-settings-button,
.nara-consent-fab,
.nara-consent-embed { font-family: var(--nara-consent-font, inherit); }

.nara-consent-settings-footer {
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
}

.nara-consent-settings-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.nara-consent-settings-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* A held video: the placeholder covers Elementor's empty video element and fades in half a second late, so a video that starts at once is never seen behind it. A held hero keeps a dark background for the text over it. */
[data-nara-held] .elementor-wrapper { position: relative; }
[data-nara-held]:not(.elementor-widget) { background-color: #222; }

.nara-consent-embed {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #222;
  color: #fff;
  opacity: 0;
  animation: nara-consent-embed-in 0s 0.5s forwards;
}

@keyframes nara-consent-embed-in { to { opacity: 1; } }

.nara-consent-embed__play {
  padding: 10px 18px;
  border: 2px solid;
  border-radius: 4px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.nara-consent-embed__link { color: inherit; font-size: 13px; }
