/* Overlay */
.cb-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
}
.cb-modal.is-open { display: block; }

.cb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(33,33,33,.75);
}

/* Sheet (не по центру через top:50%, чтобы iPhone-клавиатура не ломала) */
.cb-sheet {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: min(520px, calc(100vw - 24px));
  max-height: calc(var(--cb-vh, 100dvh) - 24px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;

  background: #fff;
  border-radius: 18px;
  padding: 18px 18px 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  box-sizing: border-box;
}

.cb-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  font-size: 28px;
  line-height: 40px;
  cursor: pointer;
  text-align: center;
  color: black;
}

.cb-title {
  margin: 6px 0 6px;
  font-size: 30px;
  font-weight: 800;
}

.cb-subtitle {
  margin: 0 0 14px;
  color: #1d8cff;
  font-weight: 700;
}

.cb-form { display: grid; gap: 10px; }

.cb-label { font-weight: 700; font-size: 14px; }

.cb-phone {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
}

.cb-prefix {
  font-weight: 800;
  font-size: 20px;
}

.cb-input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 18px;
  outline: none;
  box-sizing: border-box;
}

.cb-input:focus {
  border-color: rgba(29,140,255,.65);
  box-shadow: 0 0 0 3px rgba(29,140,255,.18);
}

.cb-input.error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229,57,53,.15);
}

.cb-error {
  margin-top: -4px;
  font-size: 14px;
  color: #e53935;
  display: none;
  font-weight: 700;
}
.cb-error.is-show { display: block; }

.cb-btn {
  height: 54px;
  border: 0;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  background: #2bb0f5;
  color: #fff;
}
.cb-btn:disabled { opacity: .6; cursor: default; }

.cb-success {
  display: none;
  margin-top: 8px;
  font-weight: 800;
  color: #16a34a;
}
.cb-success.is-show { display: block; }

/* Lock page scroll */
body.cb-lock {
  position: fixed;
  width: 100%;
  overflow: hidden;
}