.cookie-consent-banner,
.cookie-consent-dialog {
  position: fixed;
  z-index: 1000;
  color: var(--ink, #10201c);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.cookie-consent-visible {
  padding-bottom: 132px;
}

.cookie-consent-banner {
  left: 50%;
  bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  width: min(920px, calc(100% - 32px));
  border: 1px solid var(--line, #d9e6e1);
  border-radius: 8px;
  background: var(--surface, var(--paper, #ffffff));
  box-shadow: 0 18px 46px rgba(13, 32, 28, 0.22);
  padding: 16px;
  transform: translateX(-50%);
}

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

.cookie-consent-banner h2,
.cookie-consent-dialog h2 {
  margin: 0;
  color: var(--ink, #10201c);
  font-size: 18px;
  line-height: 1.2;
}

.cookie-consent-banner p,
.cookie-consent-dialog p {
  margin: 6px 0 0;
  color: var(--muted, #5f716b);
  font-size: 14px;
  line-height: 1.45;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cookie-consent-button,
.cookie-settings-link {
  border: 1px solid var(--line, #d9e6e1);
  border-radius: 6px;
  background: var(--surface, var(--paper, #ffffff));
  color: var(--ink, #10201c);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 36px;
  padding: 0 12px;
}

.cookie-consent-button.primary {
  border-color: var(--teal, #057c70);
  background: var(--teal, #057c70);
  color: #ffffff;
}

.cookie-consent-button:hover,
.cookie-consent-button:focus,
.cookie-settings-link:hover,
.cookie-settings-link:focus {
  border-color: var(--teal, #057c70);
  outline: 0;
}

.cookie-settings-link {
  min-height: 0;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-decoration: underline;
}

.cookie-consent-dialog {
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 14, 12, 0.52);
  padding: 16px;
}

.cookie-consent-panel {
  display: grid;
  gap: 12px;
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  border: 1px solid var(--line, #d9e6e1);
  border-radius: 8px;
  background: var(--surface, var(--paper, #ffffff));
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.32);
  padding: 18px;
}

.cookie-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 16px;
  align-items: start;
  border: 1px solid var(--line, #d9e6e1);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface, #ffffff) 90%, var(--surface-soft, #edf6f3));
  padding: 14px;
}

.cookie-choice-text,
.cookie-choice-text strong,
.cookie-choice-text span {
  display: block;
}

.cookie-choice-text strong {
  color: var(--ink, #10201c);
  font-size: 14px;
  line-height: 1.2;
}

.cookie-choice-text span {
  margin-top: 5px;
  color: var(--muted, #5f716b);
  font-size: 13px;
  line-height: 1.4;
}

.cookie-switch {
  position: relative;
  justify-self: end;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  align-items: center;
  width: 52px;
  height: 30px;
  margin-top: 1px;
}

.cookie-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
  opacity: 0;
}

.cookie-switch-track {
  pointer-events: none;
  position: relative;
  display: block;
  width: 52px;
  height: 30px;
  border: 1px solid var(--line, #d9e6e1);
  border-radius: 999px;
  background: var(--muted, #5f716b);
}

.cookie-switch-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 160ms ease;
}

.cookie-switch input:checked + .cookie-switch-track {
  background: var(--teal, #057c70);
}

.cookie-switch input:checked + .cookie-switch-track::after {
  transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-switch-track {
  opacity: 0.72;
}

@media (max-width: 720px) {
  body.cookie-consent-visible {
    padding-bottom: 250px;
  }

  .cookie-consent-banner {
    grid-template-columns: 1fr;
  }

  .cookie-consent-actions {
    justify-content: stretch;
  }

  .cookie-consent-button {
    flex: 1 1 130px;
  }

  .cookie-choice {
    grid-template-columns: minmax(0, 1fr) 52px;
    gap: 12px;
    padding: 12px;
  }
}
