:root {
  --consent-surface: #f6f3ee;
  --consent-surface-strong: #ffffff;
  --consent-ink: #101116;
  --consent-muted: #5f6470;
  --consent-border: rgba(16, 17, 22, 0.12);
  --consent-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
  --consent-radius: 24px;
}

body.revlab-consent-locked {
  overflow: hidden;
}

.simple-form-status {
  color: rgba(255, 255, 255, 0.72);
  font-family: "DM Sans", sans-serif;
  font-size: 0.92rem;
  line-height: 1.5;
  min-height: 1.4em;
  margin: -4px 0 0;
}

.simple-form-status.is-error {
  color: #ffb19b;
}

.simple-form-status.is-success {
  color: #d8f7be;
}

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

.consent-root {
  color: var(--consent-ink);
  font-family: "DM Sans", sans-serif;
  position: relative;
  z-index: 9999;
}

.cookie-banner {
  background: var(--consent-surface);
  border: 1px solid var(--consent-border);
  border-radius: var(--consent-radius);
  box-shadow: var(--consent-shadow);
  left: 50%;
  max-width: 760px;
  padding: 24px 24px 22px;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(760px, calc(100vw - 56px));
}

.cookie-banner__top {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin-bottom: 0.55rem;
}

.cookie-banner__top::before {
  content: "";
}

.cookie-banner__emoji {
  display: block;
  font-size: 3.2rem;
  line-height: 1;
  text-align: center;
}

.cookie-banner__dismiss {
  align-self: start;
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(16, 17, 22, 0.5);
  cursor: pointer;
  font-size: 1.5rem;
  justify-self: end;
  line-height: 1;
  padding: 0;
}

.cookie-banner__body {
  color: var(--consent-ink);
  display: grid;
  gap: 0.92rem;
}

.cookie-banner__body p {
  font-size: 0.98rem;
  line-height: 1.72;
  margin: 0;
}

.cookie-banner__body a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.cookie-banner__actions {
  display: grid;
  gap: 10px;
  margin-top: 1.1rem;
}

.cookie-btn {
  appearance: none;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  min-height: 56px;
  padding: 0.95rem 1.25rem;
  transition:
    transform 0.15s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
  width: 100%;
}

.cookie-btn:hover {
  transform: translateY(-1px);
}

.cookie-btn:focus-visible,
.cookie-toggle__option:focus-visible,
.cookie-modal__close:focus-visible,
.cookie-banner__dismiss:focus-visible {
  outline: 2px solid #ff845e;
  outline-offset: 3px;
}

.cookie-btn--ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--consent-ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.cookie-btn--link {
  background: transparent;
  border: 0;
  color: var(--consent-ink);
  font-size: 0.9rem;
  font-weight: 700;
  justify-self: center;
  min-height: auto;
  padding: 0.15rem 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  width: auto;
}

.cookie-btn--primary {
  background: #12131a;
  border: 1px solid #12131a;
  color: #ffffff;
}

.cookie-btn--secondary {
  background: transparent;
  border: 1px solid rgba(16, 17, 22, 0.24);
  color: var(--consent-ink);
}

.cookie-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
}

.cookie-modal__backdrop {
  backdrop-filter: blur(6px);
  background: rgba(10, 10, 12, 0.56);
  inset: 0;
  position: absolute;
}

.cookie-modal__dialog {
  background: var(--consent-surface);
  border: 1px solid var(--consent-border);
  border-radius: 28px;
  box-shadow: var(--consent-shadow);
  max-height: calc(100vh - 40px);
  max-width: 820px;
  overflow: auto;
  padding: 28px 28px 24px;
  position: relative;
  width: min(820px, 100%);
}

.cookie-modal__header {
  align-items: start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.cookie-modal__title {
  font-family: "ClashGrotesk", "DM Sans", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.cookie-modal__close {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(16, 17, 22, 0.5);
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
  padding: 0;
}

.cookie-modal__intro {
  display: grid;
  gap: 0.95rem;
}

.cookie-modal__intro p {
  font-size: 1rem;
  line-height: 1.72;
  margin: 0;
}

.cookie-modal__eyebrow {
  color: rgba(16, 17, 22, 0.52);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 1.5rem 0 0.9rem;
  text-transform: uppercase;
}

.cookie-preference-list {
  display: grid;
  gap: 12px;
}

.cookie-preference {
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(16, 17, 22, 0.08);
  border-radius: 18px;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 18px;
}

.cookie-preference__copy {
  display: grid;
  gap: 0.28rem;
}

.cookie-preference__title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
}

.cookie-preference__text {
  color: var(--consent-muted);
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0;
}

.cookie-preference__badge {
  color: rgba(16, 17, 22, 0.58);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cookie-toggle {
  background: rgba(16, 17, 22, 0.06);
  border-radius: 12px;
  display: inline-grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(52px, 1fr));
  padding: 4px;
}

.cookie-toggle__option {
  appearance: none;
  background: #ffffff;
  border: 1px solid rgba(16, 17, 22, 0.08);
  border-radius: 9px;
  color: rgba(16, 17, 22, 0.62);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  min-height: 34px;
  min-width: 52px;
  padding: 0 0.8rem;
}

.cookie-toggle__option.is-active {
  background: #12131a;
  border-color: #12131a;
  color: #ffffff;
}

.cookie-modal__footer {
  display: grid;
  gap: 0.9rem;
  justify-items: center;
  margin-top: 1.7rem;
}

.cookie-modal__footer p {
  color: var(--consent-muted);
  font-size: 0.94rem;
  line-height: 1.55;
  margin: 0;
  text-align: center;
}

.cookie-modal__footer a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.cookie-modal__save {
  max-width: 240px;
}

@media (max-width: 767px) {
  .cookie-banner {
    border-radius: 22px;
    padding: 20px 17px 17px;
    width: min(85vw, 340px);
  }

  .cookie-banner__emoji {
    font-size: 2.45rem;
  }

  .cookie-banner__dismiss {
    font-size: 1.35rem;
  }

  .cookie-banner__body p {
    font-size: 0.9rem;
    line-height: 1.64;
  }

  .cookie-btn {
    font-size: 0.95rem;
    min-height: 50px;
    padding: 0.85rem 1rem;
  }

  .cookie-btn--link {
    font-size: 0.84rem;
    min-height: auto;
    padding: 0;
  }

  .cookie-modal {
    padding: 12px;
  }

  .cookie-modal__dialog {
    border-radius: 24px;
    max-height: calc(100vh - 24px);
    padding: 22px 18px 18px;
  }

  .cookie-modal__title {
    font-size: 1.2rem;
  }

  .cookie-modal__intro p,
  .cookie-modal__footer p,
  .cookie-preference__text {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .cookie-preference {
    padding: 14px 15px;
  }

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

  .cookie-preference__badge,
  .cookie-toggle {
    justify-self: start;
  }
}
