.cg-captcha {
  --cg-captcha-navy: #123b5d;
  --cg-captcha-orange: #ff6d1d;
  --cg-captcha-orange-hover: #e95d0e;
  --cg-captcha-muted: #70869a;
  --cg-captcha-line: #cfdae3;
  --cg-captcha-error: #c63f32;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 20px;
  font-family: inherit;
}

.cg-captcha[hidden] {
  display: none;
}

.cg-captcha-open {
  overflow: hidden;
}

.cg-captcha__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 34, 53, 0.56);
}

.cg-captcha__dialog {
  position: relative;
  width: min(100%, 420px);
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(12, 43, 67, 0.28);
  animation: cg-captcha-appear 180ms ease-out;
}

.cg-captcha__accent {
  height: 4px;
  background: var(--cg-captcha-orange);
}

.cg-captcha__body {
  position: relative;
  box-sizing: border-box;
  padding: 28px;
}

.cg-captcha__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8da0af;
  font: 300 28px/1 Arial, sans-serif;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.cg-captcha__close:hover {
  background: #f1f5f8;
  color: var(--cg-captcha-navy);
}

.cg-captcha__icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 50%;
  background: #fff0e7;
  color: var(--cg-captcha-orange);
  font-size: 20px;
  font-weight: 700;
}

.cg-captcha__title {
  margin: 0 42px 8px 0;
  color: var(--cg-captcha-navy);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.cg-captcha__description {
  margin: 0 0 20px;
  color: var(--cg-captcha-muted);
  font-size: 14px;
  line-height: 1.5;
}

.cg-captcha__question {
  margin-bottom: 10px;
  color: var(--cg-captcha-navy);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.cg-captcha__input {
  display: block;
  width: 100%;
  height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid var(--cg-captcha-line);
  border-radius: 9px;
  outline: none;
  background: #fff;
  color: var(--cg-captcha-navy);
  font: inherit;
  font-size: 17px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.cg-captcha__input:focus {
  border-color: var(--cg-captcha-orange);
  box-shadow: 0 0 0 3px rgba(255, 109, 29, 0.16);
}

.cg-captcha__input:disabled {
  background: #f4f7f9;
  color: #8797a4;
}

.cg-captcha__error {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--cg-captcha-error);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.cg-captcha__error[hidden] {
  visibility: hidden;
}

.cg-captcha__actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.cg-captcha__button {
  min-height: 44px;
  flex: 1 1 0;
  padding: 10px 18px;
  border: 0;
  border-radius: 24px;
  outline: none;
  background: #edf3f7;
  color: var(--cg-captcha-navy);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.cg-captcha__button:hover:not(:disabled) {
  background: #e2ebf1;
}

.cg-captcha__button:focus-visible,
.cg-captcha__close:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 109, 29, 0.26);
}

.cg-captcha__button--primary {
  background: var(--cg-captcha-orange);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 109, 29, 0.24);
}

.cg-captcha__button--primary:hover:not(:disabled) {
  background: var(--cg-captcha-orange-hover);
  transform: translateY(-1px);
}

.cg-captcha__button:disabled {
  cursor: wait;
  opacity: 0.68;
}

@keyframes cg-captcha-appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 480px) {
  .cg-captcha {
    padding: 12px;
  }

  .cg-captcha__body {
    padding: 24px 18px 18px;
  }

  .cg-captcha__title {
    font-size: 19px;
  }

  .cg-captcha__description {
    margin-bottom: 17px;
    font-size: 13px;
  }

  .cg-captcha__actions {
    flex-direction: column-reverse;
  }

  .cg-captcha__button {
    width: 100%;
    flex-basis: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-captcha__dialog {
    animation: none;
  }

  .cg-captcha__button,
  .cg-captcha__close,
  .cg-captcha__input {
    transition: none;
  }
}
