/* Agua Fabrics cookie consent */
.agua-consent {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 150;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #fff;
  background: #323E48;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
  animation: agua-consent-in 0.25s ease-out;
}

.agua-consent[hidden],
.agua-consent [hidden] {
  display: none;
}

.agua-consent__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 80rem;
  margin: 0 auto;
}

.agua-consent__title,
.agua-consent__prefs-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.agua-consent__title:focus,
.agua-consent__prefs-title:focus {
  outline: none;
}

.agua-consent__text,
.agua-consent__desc {
  margin: 0;
}

.agua-consent__link {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.agua-consent__link:hover {
  color: #e5e7eb;
}

.agua-consent__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.agua-consent__btn {
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #323E48;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.agua-consent__btn:hover {
  background: #e5e7eb;
  border-color: #e5e7eb;
}

.agua-consent__btn--outline {
  color: #fff;
  background: transparent;
}

.agua-consent__btn--outline:hover {
  color: #323E48;
}

.agua-consent__btn:focus-visible,
.agua-consent__link:focus-visible,
.agua-consent__switch input:focus-visible {
  outline: 3px solid #C02026;
  outline-offset: 2px;
}

.agua-consent__prefs {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.agua-consent__list {
  display: grid;
  gap: 1rem;
  margin: 0.75rem 0 1rem;
  padding: 0;
  list-style: none;
}

.agua-consent__switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  cursor: pointer;
}

.agua-consent__switch input {
  position: relative;
  flex-shrink: 0;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.agua-consent__switch input::after {
  content: "";
  position: absolute;
  top: 0.1875rem;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}

.agua-consent__switch input:checked {
  background: #C02026;
}

.agua-consent__switch input:checked::after {
  transform: translateX(1.25rem);
}

.agua-consent__switch input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.agua-consent__label {
  font-weight: 600;
}

.agua-consent__desc {
  font-size: 0.875rem;
  color: #e5e7eb;
}

@media (min-width: 768px) {
  .agua-consent {
    padding: 1.25rem 2rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .agua-consent__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .agua-consent__intro {
    flex: 1 1 28rem;
  }

  .agua-consent__actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .agua-consent__prefs {
    flex-basis: 100%;
  }

  .agua-consent__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@keyframes agua-consent-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .agua-consent,
  .agua-consent__btn,
  .agua-consent__switch input,
  .agua-consent__switch input::after {
    animation: none;
    transition: none;
  }
}
