:root {
  --gscm-consent-radius: var(--wp--custom--border--radius--large, var(--radius-lg, 1rem));
  --gscm-consent-shadow: var(--wp--preset--shadow--deep, var(--shadow-xl, 0 1.25rem 3.5rem rgb(0 0 0 / 0.24)));
  --gscm-consent-font: var(--wp--preset--font-family--body, var(--font-family-base, inherit));
}

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

/*
 * The notice occupies only the space of the card. It does not add a full-screen
 * backdrop, block page clicks, or lock scrolling.
 */
.gscm-consent-gate {
  position: fixed;
  z-index: 2147483000;
  top: 50%;
  left: 50%;
  width: min(calc(100% - 2rem), 34rem);
  transform: translate(-50%, -50%);
  font-family: var(--gscm-consent-font);
  pointer-events: none;
}

.gscm-consent-gate__dialog {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  color: #111827 !important;
  background: #ffffff !important;
  border: 1px solid rgb(17 24 39 / 0.14);
  border-radius: var(--gscm-consent-radius);
  box-shadow: var(--gscm-consent-shadow);
  outline: none;
  pointer-events: auto;
}

.gscm-consent-gate__icon {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.8rem;
  place-items: center;
  color: #111827;
}

.gscm-consent-gate__icon svg {
  width: 100%;
  height: 100%;
}

.gscm-consent-gate__title {
  margin: 0 0 0.6rem !important;
  color: #111827 !important;
  font: inherit !important;
  font-size: clamp(1.35rem, 3vw, 1.75rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.gscm-consent-gate__description {
  margin: 0 !important;
  color: #4b5563 !important;
  font-size: 0.98rem !important;
  line-height: 1.6 !important;
}

.gscm-consent-gate__description a {
  color: #111827 !important;
  font-weight: 700 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 0.08em !important;
  text-underline-offset: 0.15em !important;
}

.gscm-consent-gate__actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.6rem !important;
  margin-top: 1.25rem !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Large primary consent button. */
#gscm-consent-gate button.gscm-consent-gate__button--primary {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 3.35rem !important;
  margin: 0 !important;
  padding: 0.85rem 1.15rem !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #111827 !important;
  background-image: none !important;
  border: 2px solid #111827 !important;
  border-radius: calc(var(--gscm-consent-radius) * 0.65) !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-align: center !important;
  text-indent: 0 !important;
  text-shadow: none !important;
  text-transform: none !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#gscm-consent-gate button.gscm-consent-gate__button--primary:hover,
#gscm-consent-gate button.gscm-consent-gate__button--primary:focus,
#gscm-consent-gate button.gscm-consent-gate__button--primary:active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #030712 !important;
  border-color: #030712 !important;
}

/* Decline remains a real button for accessibility, but appears as small text. */
#gscm-consent-gate button.gscm-consent-gate__decline {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-block !important;
  align-self: center !important;
  width: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0.25rem 0.5rem !important;
  color: #374151 !important;
  -webkit-text-fill-color: #374151 !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: normal !important;
  text-align: center !important;
  text-decoration: underline !important;
  text-underline-offset: 0.18em !important;
  text-indent: 0 !important;
  text-shadow: none !important;
  text-transform: none !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#gscm-consent-gate button.gscm-consent-gate__decline:hover,
#gscm-consent-gate button.gscm-consent-gate__decline:focus,
#gscm-consent-gate button.gscm-consent-gate__decline:active {
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
  background: transparent !important;
}

#gscm-consent-gate button::before,
#gscm-consent-gate button::after {
  display: none !important;
  content: none !important;
}

#gscm-consent-gate button > span {
  display: inline !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  clip: auto !important;
  overflow: visible !important;
  font: inherit !important;
  letter-spacing: normal !important;
  text-indent: 0 !important;
  text-transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#gscm-consent-gate button:focus-visible,
.gscm-consent-gate__description a:focus-visible {
  outline: 3px solid rgb(17 24 39 / 0.35) !important;
  outline-offset: 3px !important;
}

@media (prefers-reduced-motion: no-preference) {
  .gscm-consent-gate__dialog {
    animation: gscm-consent-pop 220ms ease-out both;
  }
}

@keyframes gscm-consent-pop {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile: compact bottom card that leaves the page visible and scrollable. */
@media (max-width: 480px) {
  .gscm-consent-gate {
    top: auto;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    width: min(calc(100% - 1.25rem), 32rem);
    transform: translateX(-50%);
  }

  .gscm-consent-gate__dialog {
    max-height: min(72dvh, 34rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1.15rem;
    border-radius: var(--gscm-consent-radius);
  }

  .gscm-consent-gate__icon {
    width: 2.15rem;
    height: 2.15rem;
    margin-bottom: 0.6rem;
  }

  .gscm-consent-gate__title {
    font-size: 1.3rem !important;
  }

  .gscm-consent-gate__description {
    font-size: 0.92rem !important;
    line-height: 1.5 !important;
  }

  @media (prefers-reduced-motion: no-preference) {
    .gscm-consent-gate__dialog {
      animation-name: gscm-consent-sheet;
    }
  }
}

@keyframes gscm-consent-sheet {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
