/*
  Cookie consent banner (js/consent.js). Fixed to the bottom of the screen; both
  choices are the same size and weight so rejecting is as easy as accepting.
*/

.cookie-banner {
  position: fixed;
  z-index: 100;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 40rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 0.5rem 3rem rgb(21 21 74 / 0.18);
}

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

.cookie-text {
  font-size: 1rem;
  line-height: 1.4;
}

.cookie-text a {
  color: var(--blue);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

.cookie-btn {
  flex: 1;
  height: 2.75rem;
  padding: 0 1.25rem;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.cookie-text a:focus-visible,
.cookie-settings:focus-visible {
  outline: 0.125rem solid currentColor;
  outline-offset: 0.125rem;
}

/* Footer link that reopens the banner; looks like the links next to it. */
.cookie-settings {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

@media (min-width: 768px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    max-width: 50rem;
    padding: 1rem 1.25rem;
  }

  .cookie-text {
    font-size: 0.875rem;
  }

  .cookie-actions {
    flex-shrink: 0;
  }

  .cookie-btn {
    height: 2.5rem;
    font-size: 0.9375rem;
  }
}

@media (min-width: 1200px) {
  .cookie-text {
    font-size: 1rem;
  }

  .cookie-btn {
    height: 2.75rem;
    font-size: 1.0625rem;
  }
}
