.cookieConsent {
  position: fixed;
  z-index: 900;
  right: var(--space-4);
  bottom: var(--space-4);
  left: var(--space-4);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: end;
  max-width: 1120px;
  max-height: calc(100dvh - 2rem);
  padding: var(--space-5);
  margin-inline: auto;
  overflow: auto;
  color: var(--text-primary);
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.cookieConsent[hidden] {
  display: none;
}

.cookieConsent h2 {
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
}

.cookieConsent p {
  max-width: 72ch;
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

.cookieConsent a,
.footerCookieButton {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookieConsentDetails {
  margin-top: var(--space-3);
}

.cookieConsentDetails summary {
  min-height: 44px;
  padding-block: var(--space-2);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
}

.cookieChoice {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-color);
}

.cookieChoice input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.cookieChoice label span {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-secondary);
  line-height: 1.5;
}

.cookieConsentActions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}

.cookieConsentActions button {
  min-height: 44px;
}

.footerCookieButton {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}

@media (max-width: 760px) {
  .cookieConsent {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .cookieConsentActions {
    justify-content: stretch;
  }

  .cookieConsentActions button {
    flex: 1 1 180px;
  }
}
