/* ═══════════════════════════════════════════
   CUATROBET REGISTRATION FORM OVERLAY
   Shown after the 3rd spin completes.
════════════════════════════════════════════ */

/* ── Overlay ────────────────────────────────────────── */
.cb-reg {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;  /* flex-start so tall cards scroll naturally */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 16px;
  background: #0C0C18;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  box-sizing: border-box;
}

.cb-reg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../../assets/images/backgrounds/form-bg.webp") center / cover no-repeat;
  opacity: .8;
  z-index: 0;
}

.cb-reg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 24, .35);
  z-index: 1;
}

.cb-reg.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Card ───────────────────────────────────────────── */
.cb-reg__card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  flex-shrink: 0;
  margin-block: auto;   /* centers card when overlay is taller than card */
  background: #111120;
  border: 1px solid rgba(252, 98, 0, 0.22);
  border-radius: 22px;
  padding: 24px 22px 22px;
  box-shadow:
    0 0 56px rgba(252, 98, 0, 0.10),
    0 28px 56px rgba(0, 0, 0, 0.65);
  box-sizing: border-box;
}

/* ── Top bar (logo + support) ───────────────────────── */
.cb-reg__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(252, 98, 0, 0.20);
}

.cb-reg__brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cb-reg__brand-icon {
  height: 26px;
  width: auto;
  display: block;
  scale: 3;
  padding-left: 28px;
}

.cb-reg__brand-text {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-heading);
}

.cb-reg__support {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(252, 98, 0, 0.30);
  color: #FC6200;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}

.cb-reg__support:hover {
  border-color: rgba(252, 98, 0, 0.70);
  color: #ff7520;
}

.cb-reg__support-icon {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
}

/* ── Header (title + login link) ───────────────────── */
.cb-reg__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.cb-reg__title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.2;
}

.cb-reg__login {
  font-size: 11px;
  font-weight: 700;
  color: #FC6200;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  margin-left: 8px;
  transition: color 0.2s;
}

.cb-reg__login:hover { color: #ff8040; }

/* ── Bonus selection button ─────────────────────────── */
.cb-bonus {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: rgba(252, 98, 0, 0.07);
  border: 1px solid rgba(252, 98, 0, 0.28);
  border-radius: 14px;
  cursor: default;
  margin-bottom: 18px;
  text-align: left;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.cb-bonus__icon {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
}

.cb-bonus__body {
  flex: 1;
  min-width: 0;
}

.cb-bonus__top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 5px;
}

.cb-bonus__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #FC6200;
  background: rgba(252, 98, 0, 0.14);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.cb-bonus__label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-bonus__text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.45;
  margin: 0;
}

.cb-bonus-hi {
  color: #FC6200;
  font-weight: 700;
}

/* ── Form ───────────────────────────────────────────── */
.cb-reg__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Field wrapper ──────────────────────────────────── */
.cb-field {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
  background: rgba(255, 255, 255, 0.055);
  border: 1.5px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  overflow: visible;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.cb-field:focus-within {
  border-color: rgba(252, 98, 0, 0.55);
}

.cb-field.is-error {
  border-color: #e05252;
  margin-bottom: 18px;
}

/* ── Input ──────────────────────────────────────────── */
.cb-field input {
  flex: 1;
  height: 100%;
  padding: 0 14px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  color: #ffffff;
  font-family: var(--font-body);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.cb-field input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.cb-field__icon {
  width: 17px;
  height: 17px;
  margin-left: 14px;
  flex-shrink: 0;
  opacity: 0.45;
  filter: brightness(100);   /* make SVG strokes white */
}

/* ── Phone prefix ───────────────────────────────────── */
.cb-field--phone .cb-field__phone-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.11);
  height: 100%;
  flex-shrink: 0;
}

.cb-field__phone-flag {
  display: flex;
  align-items: center;
  width: 22px;
  height: 15px;
  overflow: hidden;
  border-radius: 2px;
  flex-shrink: 0;
}

.cb-field__phone-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-field__phone-code {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

.cb-field--phone input { padding-left: 10px; }

/* ── Password toggle ────────────────────────────────── */
.cb-field__toggle {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 0 13px;
  height: 100%;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s;
  flex-shrink: 0;
}

.cb-field__toggle:hover { color: rgba(255, 255, 255, 0.75); }

.cb-field__eye {
  width: 17px;
  height: 17px;
  display: block;
}

/* ── Inline error ───────────────────────────────────── */
.cb-field__error {
  display: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: #ff5b6b;
}

.cb-field .cb-field__error {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 5;
  pointer-events: none;
}

.cb-check .cb-field__error {
  display: none;
  margin-top: 4px;
}

.cb-field.is-error .cb-field__error,
.cb-check.is-error .cb-field__error {
  display: block;
}

/* ── Checkbox ───────────────────────────────────────── */
.cb-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  margin-top: 2px;
}

.cb-check input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.cb-check__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: border-color 0.2s, background 0.2s;
}

.cb-check.is-checked .cb-check__box {
  border-color: #FC6200;
  background: #FC6200;
}

.cb-check.is-error .cb-check__box {
  border-color: #e05252;
}

.cb-check__icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.cb-check__icon svg {
  width: 14px;
  height: 14px;
  overflow: visible;
}

.cb-check__icon path {
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cb-check.is-checked .cb-check__icon { display: flex; }

.cb-check__text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.55;
  user-select: none;
}

.cb-check__text a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.28);
}

/* ── Submit ─────────────────────────────────────────── */
.cb-reg__submit {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, #FC6200 0%, #EF5D00 100%);
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.07em;
  color: #ffffff;
  cursor: pointer;
  margin-top: 6px;
  text-transform: uppercase;
  box-shadow: 0 4px 24px rgba(252, 98, 0, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cb-reg__submit:hover {
  background: linear-gradient(135deg, #ff7520 0%, #FC6200 100%);
  box-shadow: 0 6px 32px rgba(252, 98, 0, 0.55);
  transform: translateY(-2px);
}

.cb-reg__submit:active { transform: translateY(0); }
.cb-reg__submit:disabled { opacity: 0.55; pointer-events: none; }

/* ── Sign-in link ───────────────────────────────────── */
.cb-reg__signin {
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
  margin: 8px 0 0;
}

.cb-reg__signin a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.28);
}

/* ── Success state ──────────────────────────────────── */
.cb-reg__success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 8px;
  gap: 16px;
}

.cb-reg__success.is-visible { display: flex; }

.cb-reg__success-icon {
  width: 64px;
  height: 64px;
  background: rgba(252, 98, 0, 0.14);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cb-reg__success-icon svg {
  width: 30px;
  height: 30px;
  stroke: #FC6200;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.cb-reg__success-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

.cb-reg__success-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.65;
  margin: 0;
  max-width: 280px;
}

/* ── Mobile ─────────────────────────────────────────── */
@media (max-width: 480px) {
  .cb-reg { padding: 14px 12px; }

  .cb-reg__card {
    max-width: 100%;
    border-radius: 18px;
    padding: 20px 16px 18px;
  }

  .cb-reg__title { font-size: 17px; }

  .cb-bonus {
    padding: 10px 11px;
    margin-bottom: 14px;
  }

  .cb-bonus__icon { width: 40px; height: 40px; }
  .cb-bonus__text { font-size: 12px; }

  .cb-field { height: 48px; }
  .cb-field input { font-size: 13px; }

  .cb-reg__submit { height: 48px; font-size: 15px; }
}

@media (max-height: 660px) {
  .cb-reg { padding-block: 10px; justify-content: flex-start; }
  .cb-reg__card { margin-bottom: 10px; }
  .cb-reg__top { margin-bottom: 12px; }
  .cb-bonus { padding: 9px 11px; margin-bottom: 12px; }
  .cb-bonus__icon { width: 36px; height: 36px; }
  .cb-reg__form { gap: 8px; }
  .cb-field { height: 44px; }
  .cb-reg__submit { height: 44px; margin-top: 4px; }
}

/* ── 768px ───────────────────────────────────────── */
@media (max-width: 768px) {
  .cb-reg {
    min-height: 100dvh !important;
    height: 100dvh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px !important;
    overflow: hidden !important;
  }

  .cb-reg__card {
    width: min(92vw, 420px) !important;
    margin: 0 auto !important;
  }

  .cb-reg__success {
    min-height: auto !important;
    padding: 36px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .cb-reg__success h2 {
    font-size: clamp(24px, 7vw, 34px) !important;
    line-height: 1.1 !important;
    margin: 18px 0 !important;
    text-align: center !important;
  }

  .cb-reg__success p {
    font-size: clamp(16px, 4.8vw, 22px) !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    text-align: center !important;
  }
}

/* ── Autofill ───────────────────────────────────────── */
.cb-reg input:-webkit-autofill,
.cb-reg input:-webkit-autofill:hover,
.cb-reg input:-webkit-autofill:focus,
.cb-reg input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
  background: transparent !important;
  background-color: transparent !important;
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  box-shadow:         0 0 0 1000px transparent inset !important;
  transition: background-color 9999s ease-in-out 0s !important;
}
