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

.cookie-consent__banner,
.cookie-consent__panel {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  box-shadow: 0 12px 36px rgba(26, 26, 24, 0.2);
  font-family: var(--font-body);
}

.cookie-consent__banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.cookie-consent__panel {
  max-height: min(80vh, 560px);
  overflow-y: auto;
}

.cookie-consent__copy {
  flex: 1 1 38rem;
  min-width: 0;
}

.cookie-consent__eyebrow,
.cookie-consent__required {
  color: var(--terracotta);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cookie-consent h2 {
  margin: 0.2rem 0 0.35rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
}

.cookie-consent p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.cookie-consent__legal {
  margin-top: 0.45rem !important;
  color: var(--fg-muted);
  font-size: 0.76rem !important;
}

.cookie-consent a {
  color: var(--accent);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.cookie-consent__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.cookie-consent__button,
.cookie-consent__settings {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 0.7rem 0.9rem;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cookie-consent__button--primary {
  background: var(--accent);
  color: var(--bg);
}

.cookie-consent__button--primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.cookie-consent__button--secondary {
  background: transparent;
  color: var(--accent);
}

.cookie-consent__button--secondary:hover {
  background: var(--bg-warm);
}

.cookie-consent__settings {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 999;
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 5px 18px rgba(26, 26, 24, 0.16);
}

.cookie-consent__settings:hover {
  background: var(--bg-warm);
}

.cookie-consent__categories {
  margin: 1rem 0 0;
  padding: 0;
  border: 0;
}

.cookie-consent__legend {
  margin-bottom: 0.45rem;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cookie-consent__category {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.cookie-consent__category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-consent__category-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.cookie-consent__category-label input {
  accent-color: var(--accent);
  height: 1rem;
  width: 1rem;
}

.cookie-consent__category-label input:disabled {
  cursor: not-allowed;
}

.cookie-consent__category-description {
  margin: 0.25rem 0 0 1.55rem !important;
  color: var(--fg-muted);
  font-size: 0.78rem !important;
}

.cookie-consent__actions--panel {
  justify-content: flex-end;
  margin-top: 0.9rem;
}

.cookie-consent__panel .cookie-consent__legal {
  margin-top: 0.9rem !important;
}

.cookie-consent :is(a, button, input):focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
}

@media (max-width: 680px) {
  .cookie-consent__banner {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .cookie-consent__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent__button {
    width: 100%;
  }

  .cookie-consent__category-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .cookie-consent__settings {
    right: 0.75rem;
    bottom: 0.75rem;
  }
}

@media print {
  .cookie-consent {
    display: none !important;
  }
}
