.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner {
  position: fixed;
  /* Keep first-visit choices above the fixed help assistant on small screens. */
  z-index: 10002;
  right: 20px;
  bottom: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  max-width: 1080px;
  margin-inline: auto;
  padding: 24px 28px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: #152321;
  color: #fff;
  box-shadow: 0 18px 60px rgba(21, 35, 33, .3);
}

.cookie-banner-copy {
  max-width: 700px;
}

.cookie-eyebrow {
  margin: 0 0 6px;
  color: #c8f169;
  font: 700 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cookie-banner h2,
.cookie-settings h2 {
  margin: 0 0 8px;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.2;
}

.cookie-banner-copy > p:not(.cookie-eyebrow) {
  margin: 0 0 9px;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner a,
.cookie-settings-card > a {
  color: #c8f169;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner-actions,
.cookie-settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.cookie-banner-actions .cookie-button {
  border-color: #c8f169;
  background: #c8f169;
  color: #152321;
  text-decoration: none;
}

.cookie-button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  cursor: pointer;
}

.cookie-button:hover,
.cookie-button:focus-visible {
  border-color: #c8f169;
  outline: 2px solid #c8f169;
  outline-offset: 2px;
}

.cookie-button-primary {
  border-color: #c8f169;
  background: #c8f169;
  color: #152321;
}

.cookie-button-primary:hover,
.cookie-button-primary:focus-visible {
  background: #d7ff86;
  color: #152321;
}

.cookie-button-text {
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-settings {
  width: min(620px, calc(100% - 28px));
  max-width: none;
  max-height: min(88vh, 820px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: #f2f1ec;
  color: #152321;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .35);
}

.cookie-settings::backdrop {
  background: rgba(12, 22, 20, .65);
  backdrop-filter: blur(3px);
}

.cookie-settings-card {
  position: relative;
  padding: clamp(24px, 5vw, 38px);
}

.cookie-settings-card > p:not(.cookie-eyebrow) {
  color: #56615d;
  font-size: 14px;
}

.cookie-settings .cookie-eyebrow {
  color: #536440;
}

.cookie-close {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #e2e4dc;
  color: #152321;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0;
  padding: 15px 16px;
  border: 1px solid #d7d9d1;
  border-radius: 12px;
  background: #fff;
}

fieldset.cookie-category {
  min-width: 0;
}

.cookie-category legend {
  padding: 0 4px;
  font-weight: 700;
}

.cookie-category p,
.cookie-category small {
  display: block;
  margin: 5px 0 0;
  color: #65706b;
  font-size: 13px;
  line-height: 1.45;
}

.cookie-category strong {
  display: block;
}

.cookie-always-on {
  flex: none;
  color: #536440;
  font-size: 12px;
  font-weight: 700;
}

.cookie-category input {
  flex: none;
  width: 21px;
  height: 21px;
  accent-color: #152321;
}

.cookie-current-inventory {
  padding: 10px 12px;
  border-left: 3px solid #91b83b;
  background: #e8ebdf;
  font-size: 13px !important;
}

.cookie-settings-actions {
  justify-content: flex-start;
  margin: 20px 0 14px;
}

.cookie-settings .cookie-button {
  border-color: #152321;
  background: #152321;
  color: #fff;
}

.cookie-settings .cookie-button-primary {
  border-color: #152321;
  background: #152321;
  color: #fff;
}

.cookie-settings .cookie-button-primary:hover,
.cookie-settings .cookie-button-primary:focus-visible {
  background: #243733;
}

.footer-legal [data-cookie-settings] {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal [data-cookie-settings]:hover,
.footer-legal [data-cookie-settings]:focus-visible {
  color: var(--lime);
}

@media (max-width: 760px) {
  .cookie-banner {
    right: 10px;
    bottom: 10px;
    left: 10px;
    grid-template-columns: 1fr;
    gap: 17px;
    max-height: calc(100dvh - 20px);
    padding: 20px;
    overflow: auto;
    border-radius: 16px;
  }

  .cookie-banner-actions {
    justify-content: stretch;
  }

  .cookie-banner-actions .cookie-button {
    flex: 1 1 30%;
    padding-inline: 10px;
  }

  .cookie-settings-actions .cookie-button {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cookie-banner:not([hidden]) {
    animation: cookie-banner-in .2s ease-out both;
  }

  @keyframes cookie-banner-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
