/* ================= MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 35, .75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-overlay.is-open {
  display: flex;
  opacity: 1;
}

.modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  padding: 40px 40px 34px;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .35);
  transform: translateY(20px);
  transition: transform .3s ease;
  color: #0d1522;
}
.modal-overlay.is-open .modal { transform: translateY(0); }

.modal__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #eef2f8;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: .25s;
  border: none;
}
.modal__close:hover { background: #dde5ef; }
.modal__close svg { width: 16px; height: 16px; stroke: #0d1522; stroke-width: 2; fill: none; }

.modal__title {
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 28px;
  letter-spacing: .5px;
}

.modal__field { margin-bottom: 18px; }
.modal__field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #0d1522;
}
.modal__field label .req { color: #e53935; }

.modal__input,
.modal__textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #dde5ef;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0d1522;
  background: #f7f9fc;
  transition: .25s;
  outline: none;
}
.modal__input:focus,
.modal__textarea:focus {
  border-color: #3b82f6;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.modal__input.is-error,
.modal__textarea.is-error { border-color: #e53935; background: #fff5f5; }

.modal__textarea {
  resize: vertical;
  min-height: 90px;
}

.modal__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: #4a5568;
  margin: 22px 0 24px;
  cursor: pointer;
  user-select: none;
}
.modal__checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.modal__checkmark {
  width: 20px; height: 20px;
  border: 1.5px solid #b9c4d2;
  border-radius: 5px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  transition: .2s;
  background: #fff;
}
.modal__checkmark svg {
  width: 12px; height: 12px;
  stroke: #fff; stroke-width: 3;
  fill: none;
  opacity: 0;
  transition: .2s;
}
.modal__checkbox input:checked + .modal__checkmark {
  background: #3b82f6;
  border-color: #3b82f6;
}
.modal__checkbox input:checked + .modal__checkmark svg { opacity: 1; }
.modal__checkbox.is-error .modal__checkmark { border-color: #e53935; }

.modal__checkbox a {
  color: #3b82f6;
  text-decoration: underline;
}

.modal__actions {
  display: flex;
  justify-content: center;
}
.modal__submit {
  padding: 15px 60px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 8px 25px rgba(59,130,246,.4);
  transition: .25s;
  font-family: inherit;
}
.modal__submit:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(59,130,246,.6); }
.modal__submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.modal__error {
  color: #e53935;
  font-size: 12px;
  margin-top: 6px;
  min-height: 14px;
}

.modal__success {
  text-align: center;
  padding: 20px 0;
}
.modal__success svg {
  width: 60px; height: 60px;
  stroke: #22c55e;
  stroke-width: 2.5;
  fill: none;
  margin: 0 auto 20px;
}
.modal__success h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}
.modal__success p { font-size: 13px; color: #4a5568; }

body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .modal { padding: 30px 22px 24px; }
  .modal__title { font-size: 19px; }
  .modal__submit { width: 100%; padding: 14px 30px; }
}
