/* ── Modal overlay ─────────────────────────────────────────────────────────── */

#modalOverlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.60);
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ── Modal container ───────────────────────────────────────────────────────── */

.modal-container {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  padding: 64px 44px 80px;
  position: relative;
  background: #141415;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  line-height: 1;
  color: #fff;
  z-index: 1;
  transition: opacity 0.2s;
}

.modal-close:hover { opacity: 0.7; }

/* ── Form typography ───────────────────────────────────────────────────────── */

form[data-type] h2 {
  font-family: 'KronaOne', sans-serif;
  font-size: 36px;
  font-weight: 400;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
}

form[data-type] > p {
  font-size: 16px;
  color: #fff;
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.5;
}

/* ── Form fields ───────────────────────────────────────────────────────────── */

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 0;
}

.form-element {
  display: flex;
  flex-direction: column;
}

/* Field labels are visually hidden — placeholder acts as the visible label */
.form-element-container .form-element label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.form-control {
  width: 100%;
  height: 56px;
  padding: 14px 0 0;
  background: none;
  border: none;
  border-bottom: 1px solid #DEDEDE;
  border-radius: 0;
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 400;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-control::placeholder { color: rgba(255, 255, 255, 0.50); }
.form-control:focus { border-bottom-color: rgba(255, 255, 255, 0.80); }

/* ── Validation errors ─────────────────────────────────────────────────────── */

.form-error-element { display: none; }

.form-error-element span {
  font-size: 12px;
  color: #f87171;
}

.form-control.error { border-bottom-color: #f87171; }

.form-control.error + .form-error-element { display: block; }

.form-error-summary {
  margin-top: 16px;
  font-size: 13px;
  color: #f87171;
  min-height: 1em;
}

/* ── Required hint ─────────────────────────────────────────────────────────── */

.mandatory-hint {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #656565;
  margin-top: 16px;
}

/* ── Privacy consent ───────────────────────────────────────────────────────── */

.form-privacy {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 28px;
}

#pricheck {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid #fff !important;
  background: transparent !important;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

#pricheck:checked { background: #fff !important; }

.form-privacy > label {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  cursor: pointer;
  line-height: 1.4;
}

.form-privacy > label a {
  color: #fff;
  text-decoration: underline;
}

/* ── Submit button ─────────────────────────────────────────────────────────── */

.button-wrapper {
  margin-top: 32px;
}

.btn-submit {
  display: block;
  width: 100%;
  height: 50px;
  background: linear-gradient(6deg, #626262 0%, #1C1C1C 100%);
  border-radius: 15px;
  font-family: 'KronaOne', sans-serif;
  font-size: 18px;
  font-weight: 400;
  text-transform: uppercase;
  color: #fff;
  text-align: center;
  transition: opacity 0.2s;
}

.btn-submit:hover { opacity: 0.85; }

/* ── Confirmation ──────────────────────────────────────────────────────────── */

.confirmation {
  text-align: center;
  padding: 40px 0;
}

.confirmation h3 {
  font-family: 'KronaOne', sans-serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 16px;
}

.confirmation p {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
}

/* ── Cardess loading spinner ───────────────────────────────────────────────── */

.lightbox { display: none; }

.cf-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}

@keyframes cf-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.cf-circle-loading {
  transform-origin: center;
  animation: cf-spin 1.2s linear infinite;
}

.cf-circle2 { animation-delay: -0.4s; }
.cf-circle3 { animation-delay: -0.8s; }

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .modal-container { padding: 64px 24px 80px; }
  form[data-type] h2 { font-size: 28px; }
  .form-privacy > label { font-size: 16px; }
}
