/* Forms need positioning for honeypot placement */
.cg-hero-form,
.cg-reach-form {
  position: relative;
}

/* Consent checkbox (matches cg-glass aesthetics) */
.cg-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.cg-consent {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px 12px;
  align-items: flex-start;
  margin-top: 4px;
  margin-bottom: 6px;
  cursor: pointer;
  user-select: none;
}

.cg-consent__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.cg-consent__box {
  margin-top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cg-consent__box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  transform: rotate(-52deg) translateY(-1px);
  opacity: 0;
  transition: opacity 0.12s ease, border-color 0.12s ease;
}

.cg-consent__input:checked + .cg-consent__box {
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(125, 211, 252, 0.12);
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.15);
}

.cg-consent__input:checked + .cg-consent__box::after {
  opacity: 1;
  border-left-color: rgba(224, 250, 255, 0.95);
  border-bottom-color: rgba(224, 250, 255, 0.95);
}

.cg-consent__input:focus-visible + .cg-consent__box {
  outline: 2px solid rgba(125, 211, 252, 0.45);
  outline-offset: 2px;
}

.cg-consent__text {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(234, 240, 255, 0.78);
}

.cg-consent__text a {
  color: rgba(125, 211, 252, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cg-consent__text a:hover {
  text-decoration: none;
}

.cg-form-msg {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
}

.cg-form-msg[data-cg-ok='1'] {
  color: rgba(134, 239, 172, 0.95);
}

.cg-form-msg[data-cg-ok='0'] {
  color: rgba(252, 165, 165, 0.95);
}

/* First-visit consent banner */
.cg-consent-w[hidden] {
  display: none !important;
}

.cg-consent-w {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: end center;
  padding: 18px;
}

.cg-consent-w__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.55);
  backdrop-filter: blur(14px) saturate(120%);
}

.cg-consent-w__panel {
  position: relative;
  width: min(720px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
      155deg,
      rgba(125, 211, 252, 0.1),
      rgba(99, 102, 241, 0.06) 42%,
      rgba(255, 255, 255, 0.04)
    ),
    rgba(12, 18, 34, 0.88);
  padding: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  color: rgba(234, 240, 255, 0.92);
}

.cg-consent-w__title {
  font-family: var(--cg-font-display, Syne, system-ui), system-ui;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.cg-consent-w__text {
  margin-top: 8px;
  color: rgba(234, 240, 255, 0.72);
  line-height: 1.52;
}

.cg-consent-w__details {
  margin-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

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

.cg-consent-w__details p,
.cg-consent-w__details li {
  color: rgba(234, 240, 255, 0.74);
  line-height: 1.58;
}

.cg-consent-w__details ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.cg-consent-w__actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.cg-consentOpen {
  overflow: hidden;
}

/* Policy modal */
.cg-pol[hidden] {
  display: none !important;
}

.cg-pol {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 18px;
}

.cg-pol__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 20, 0.55);
  backdrop-filter: blur(14px) saturate(120%);
}

.cg-pol__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(88vh, 900px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
      155deg,
      rgba(125, 211, 252, 0.08),
      rgba(99, 102, 241, 0.05) 42%,
      rgba(255, 255, 255, 0.04)
    ),
    rgba(12, 18, 34, 0.92);
  padding: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  color: rgba(234, 240, 255, 0.9);
  display: flex;
  flex-direction: column;
}

.cg-pol__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.cg-pol__title {
  font-family: var(--cg-font-display, Syne, system-ui), system-ui;
  font-weight: 700;
  font-size: 20px;
}

.cg-pol__sub {
  margin-top: 6px;
  color: rgba(234, 240, 255, 0.58);
  font-size: 14px;
}

.cg-pol__close {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(234, 240, 255, 0.9);
  border-radius: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cg-pol__close:hover {
  border-color: rgba(125, 211, 252, 0.35);
  background: rgba(125, 211, 252, 0.08);
}

.cg-pol__body {
  margin-top: 12px;
  overflow: auto;
  padding-right: 6px;
  max-height: 52vh;
  line-height: 1.62;
}

.cg-pol__body ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.cg-pol__footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
