/* The cookie banner (partials/cookie-consent.html): a bar across the bottom
   of the screen until the visitor chooses, over the page but not blocking it.
   Phones: the text, then accept and reject side by side at full width, then
   "manage". From 768px: text and buttons on one row, the content no wider
   than the page's container. */
.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1060;
  display: none;
}

.cookie-consent.is-visible {
  display: block;
}

.cookie-consent__card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem 2rem;
  align-items: center;
  max-height: 85vh;
  overflow-y: auto;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.16);
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.cookie-consent__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.25rem;
}

.cookie-consent__text p {
  color: #4a4a4a;
  font-size: 0.95rem;
}

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cookie-consent__actions .btn {
  margin-bottom: 0;
}

/* Accept and reject: the same width, so neither reads as the default. */
.cookie-consent__choice {
  flex: 1 1 0;
  min-width: 9rem;
}

.cookie-consent__preferences {
  grid-column: 1 / -1;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cookie-consent__option {
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .cookie-consent__card {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: max(1.5rem, calc((100% - 1140px) / 2));
    padding-right: max(1.5rem, calc((100% - 1140px) / 2));
  }

  .cookie-consent__card > .cookie-consent__actions {
    flex-wrap: nowrap;
  }

  .cookie-consent__choice {
    flex: 0 0 auto;
    min-width: 10rem;
  }
}
