html.cvg-gate-open,
html.cvg-gate-open body,
body.cvg-gate-open {
  overflow: hidden !important;
  height: 100% !important;
}

.cvg-gate,
.cvg-gate * {
  box-sizing: border-box;
}

.cvg-gate {
  --cvg-accent: #2879bd;
  --cvg-card-width: 620px;
  --cvg-overlay: .06;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden !important;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #171b25;
  isolation: isolate;
}

html.cvg-verified .cvg-gate {
  display: none !important;
}

.cvg-gate-bg,
.cvg-gate-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.cvg-gate-bg {
  z-index: -2;
  background-color: #eef5fb;
  background-image: var(--cvg-bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: var(--cvg-bg-position, center center);
}

.cvg-gate-overlay {
  z-index: -1;
  background: rgba(255,255,255,var(--cvg-overlay));
}

.cvg-stage {
  width: min(100%, 980px);
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(14px, 2.8vh, 28px) 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cvg-logo-wrap {
  flex: 0 0 auto;
  margin: 0 0 clamp(10px, 1.8vh, 18px);
  text-align: center;
}

.cvg-logo {
  display: block;
  width: auto;
  max-width: min(220px, 52vw);
  max-height: clamp(58px, 8.5vh, 82px);
  object-fit: contain;
}

.cvg-card {
  flex: 0 1 auto;
  width: min(100%, var(--cvg-card-width));
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(29, 60, 91, .09);
  box-shadow: 0 18px 55px rgba(29, 56, 86, .12);
  padding: clamp(20px, 2.5vh, 28px) clamp(22px, 2.6vw, 34px);
}

.cvg-card h1 {
  margin: 0 0 8px !important;
  padding: 0 !important;
  font-size: clamp(24px, 1.8vw, 30px) !important;
  line-height: 1.12 !important;
  font-weight: 700 !important;
  letter-spacing: -.025em !important;
  color: #20232d !important;
}

.cvg-intro {
  margin: 0 0 clamp(14px, 1.9vh, 20px) !important;
  padding: 0 !important;
  color: #727b91 !important;
  font-size: 14.5px !important;
  line-height: 1.45 !important;
}

#cvg-form {
  margin: 0 !important;
  padding: 0 !important;
}

.cvg-age-row,
.cvg-confirm-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
}

.cvg-age-row {
  border: 1px solid #d9e1ea;
  padding: 12px 14px;
  margin: 0 0 clamp(13px, 1.8vh, 18px) !important;
  font-size: 14.5px;
  line-height: 1.4;
  color: #262a33;
}

.cvg-gate input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  flex: 0 0 19px;
  width: 19px !important;
  height: 19px !important;
  min-width: 19px !important;
  min-height: 19px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1.5px solid #8d96a3 !important;
  border-radius: 3px !important;
  background: #fff !important;
  display: grid !important;
  place-content: center;
  cursor: pointer;
  box-shadow: none !important;
}

.cvg-gate input[type="checkbox"]::before {
  content: "" !important;
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform .12s ease;
  margin-top: -2px;
}

.cvg-gate input[type="checkbox"]:checked {
  background: var(--cvg-accent) !important;
  border-color: var(--cvg-accent) !important;
}

.cvg-gate input[type="checkbox"]:checked::before {
  transform: rotate(-45deg) scale(1);
}

.cvg-gate input:focus-visible,
.cvg-gate select:focus-visible,
.cvg-gate button:focus-visible,
.cvg-gate a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cvg-accent), transparent 70%);
  outline-offset: 2px;
}

.cvg-role-wrap {
  margin: 0 0 clamp(12px, 1.6vh, 16px) !important;
}

.cvg-field-label {
  display: block;
  margin: 0 0 6px !important;
  font-weight: 600 !important;
  font-size: 14.5px !important;
  line-height: 1.35 !important;
  color: #242832 !important;
}

.cvg-field-label span {
  color: #e34935 !important;
  font-weight: 500 !important;
}

.cvg-role-wrap select,
#cvg-gate #cvg-role {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  border: 1px solid #d8e0e9 !important;
  border-radius: 0 !important;
  background-color: #fff !important;
  color: #2f3440 !important;
  font: inherit !important;
  font-size: 14.5px !important;
  padding: 0 42px 0 14px !important;
  cursor: pointer;
  box-shadow: none !important;
}

.cvg-role-wrap select:invalid,
.cvg-role-wrap select option[value=""] {
  color: #949caf !important;
}

.cvg-confirm-row {
  padding: clamp(10px, 1.4vh, 13px) 0 0;
  margin: 0 !important;
  border-top: 1px solid #edf0f4;
  color: #5f6674;
  font-size: 12.5px;
  line-height: 1.42;
}

.cvg-confirm-row a,
.cvg-exit-line a {
  color: var(--cvg-accent) !important;
  text-decoration: none;
}

.cvg-confirm-row a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Keep Remember Me clearly aligned to the left, under the confirmation. */
.cvg-remember-row {
  width: 100%;
  margin: 10px 0 0 !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  gap: 8px;
  cursor: pointer;
  font-size: 13px !important;
  line-height: 1.3 !important;
  color: #464d59 !important;
  text-align: left !important;
}

.cvg-remember-row input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  flex-basis: 16px;
}

.cvg-remember-row input[type="checkbox"]::before {
  width: 8px;
  height: 5px;
}

.cvg-error {
  min-height: 0;
  margin: 7px 0 0 !important;
  color: #b42318 !important;
  font-size: 12px !important;
  line-height: 1.3;
  text-align: center;
}

.cvg-error:empty {
  display: none;
}

/* Strong selectors + !important prevent theme/WooCommerce button rules from taking over. */
#cvg-gate #cvg-form #cvg-submit.cvg-submit {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: block !important;
  width: min(100%, 300px) !important;
  min-width: 0 !important;
  min-height: 44px !important;
  height: auto !important;
  margin: 12px auto 0 !important;
  padding: 11px 20px !important;
  border: 1px solid var(--cvg-accent) !important;
  border-radius: 0 !important;
  background: var(--cvg-accent) !important;
  background-image: none !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: opacity .16s ease, transform .16s ease, filter .16s ease;
}

#cvg-gate #cvg-form #cvg-submit.cvg-submit:not(:disabled):hover,
#cvg-gate #cvg-form #cvg-submit.cvg-submit:not(:disabled):focus {
  background: var(--cvg-accent) !important;
  border-color: var(--cvg-accent) !important;
  color: #fff !important;
  filter: brightness(.94);
}

#cvg-gate #cvg-form #cvg-submit.cvg-submit:not(:disabled):active {
  transform: translateY(1px);
}

#cvg-gate #cvg-form #cvg-submit.cvg-submit:disabled {
  background: #dfe6f0 !important;
  border-color: #dfe6f0 !important;
  color: #949cab !important;
  cursor: not-allowed;
  opacity: 1 !important;
}

#cvg-gate #cvg-form #cvg-submit.cvg-submit.is-loading {
  opacity: .72 !important;
  cursor: wait;
}

.cvg-exit-line {
  margin: 10px 0 0 !important;
  text-align: center !important;
  font-size: 13.5px !important;
  line-height: 1.35 !important;
  color: #2b2f37 !important;
}

.cvg-disclaimer {
  flex: 0 0 auto;
  width: min(100%, var(--cvg-card-width));
  margin: clamp(9px, 1.3vh, 13px) 0 0 !important;
  padding: 0 !important;
  color: #6f7b90 !important;
  font-size: 11.5px !important;
  line-height: 1.38 !important;
  font-style: italic !important;
  text-shadow: 0 1px 6px rgba(255,255,255,.8);
}

/* Compact desktop mode keeps the complete gate visible without scrolling. */
@media (max-height: 820px) and (min-width: 701px) {
  .cvg-stage {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .cvg-logo-wrap { margin-bottom: 9px; }
  .cvg-logo { max-height: 58px; max-width: 190px; }
  .cvg-card { padding: 18px 28px; }
  .cvg-card h1 { font-size: 24px !important; margin-bottom: 6px !important; }
  .cvg-intro { font-size: 13.5px !important; line-height: 1.38 !important; margin-bottom: 12px !important; }
  .cvg-age-row { padding: 9px 12px; margin-bottom: 10px !important; font-size: 13.5px; }
  .cvg-role-wrap { margin-bottom: 10px !important; }
  .cvg-field-label { font-size: 13.5px !important; margin-bottom: 5px !important; }
  .cvg-role-wrap select, #cvg-gate #cvg-role { height: 40px !important; min-height: 40px !important; font-size: 13.5px !important; }
  .cvg-confirm-row { padding-top: 9px; font-size: 11.5px; line-height: 1.34; }
  .cvg-remember-row { margin-top: 7px !important; font-size: 12px !important; }
  #cvg-gate #cvg-form #cvg-submit.cvg-submit { min-height: 40px !important; margin-top: 9px !important; padding: 9px 18px !important; font-size: 13.5px !important; }
  .cvg-exit-line { margin-top: 7px !important; font-size: 12.5px !important; }
  .cvg-disclaimer { margin-top: 8px !important; font-size: 10.5px !important; line-height: 1.3 !important; }
}

@media (max-width: 700px) {
  .cvg-gate {
    overflow: auto !important;
  }

  .cvg-stage {
    height: auto;
    min-height: 100dvh;
    justify-content: flex-start;
    overflow: visible;
    padding: 18px 14px 20px;
  }

  .cvg-logo-wrap {
    margin-bottom: 12px;
  }

  .cvg-logo {
    max-width: min(190px, 56vw);
    max-height: 68px;
  }

  .cvg-card {
    padding: 20px 18px;
  }

  .cvg-card h1 {
    font-size: 23px !important;
  }

  .cvg-intro {
    font-size: 13.5px !important;
    margin-bottom: 14px !important;
  }

  .cvg-confirm-row {
    font-size: 11.8px;
  }

  .cvg-disclaimer {
    font-size: 10.8px !important;
  }
}

@media (max-width: 420px) {
  .cvg-stage { padding-inline: 10px; }
  .cvg-card { padding: 18px 14px; }
  .cvg-age-row { padding: 11px 12px; }
}
