/* ============================================================
   CACHETAS — Modal Cotizador Global
   /css/modal.css
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,10,18,.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 40px;
  overflow-y: auto;
}
.modal-overlay.active {
  display: flex;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.modal-box {
  background: white;
  border-radius: 24px;
  padding: 24px 32px 28px; /* ← de 36px a 24px arriba */
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0,0,0,.22);
  position: relative;
  animation: slideUp .28s cubic-bezier(.34,1.56,.64,1);
}
@keyframes slideUp {
  from { opacity:0; transform: translateY(28px) scale(.97); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: #fafafc;
  border: 1px solid #e8e8ef;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .85rem;
  color: #7a7a90;
  transition: all .2s;
  line-height: 1;
  padding: 0;
}
.modal-close:hover { background: #fee; border-color: #fcc; color: #c00; }

.modal-logo {
  display: block;
  text-align: left;
  margin-bottom: 12px;
}
.modal-logo-img {
  height: 22px;
  width: auto;
  display: block;
}

.modal-steps {
  display: flex; gap: 6px;
  margin-bottom: 18px;
}
.modal-step {
  flex: 1; height: 3px;
  background: #e8e8ef;
  border-radius: 99px;
  transition: background .3s;
}
.modal-step.active { background: #FF5C2B; }

.modal-box h2 {
  font-size: 1.3rem; font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 4px; color: #0f0f14;
}
.modal-box > p {
  font-size: .82rem; color: #7a7a90;
  margin-bottom: 18px; line-height: 1.5;
}

.form-group { margin-bottom: 12px; }
.form-label {
  display: block; font-size: .75rem; font-weight: 600;
  color: #3a3a4a; margin-bottom: 5px;
  letter-spacing: .01em;
}
.form-input,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e8e8ef;
  border-radius: 8px;
  font-size: .875rem; color: #0f0f14;
  background: #fafafc;
  transition: border-color .2s, box-shadow .2s;
  appearance: none; -webkit-appearance: none;
  font-family: Arial, Helvetica, sans-serif;
}
.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #FF5C2B;
  box-shadow: 0 0 0 3px rgba(255,92,43,.2);
  background: white;
}
.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-submit {
  width: 100%;
  background: #FF5C2B; color: white;
  border: none; cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .95rem; font-weight: 700;
  padding: 13px;
  border-radius: 8px;
  margin-top: 6px;
  transition: background .2s, transform .2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(255,92,43,.35);
}
.btn-submit:hover:not(:disabled) {
  background: #e04520;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,92,43,.35);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.modal-disclaimer {
  font-size: .7rem; color: #7a7a90;
  text-align: center; margin-top: 10px; line-height: 1.5;
}
.modal-disclaimer a { color: #FF5C2B; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none; flex-shrink: 0;
}
.spinner.visible { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .modal-overlay { padding: 20px 12px; align-items: flex-start; }
  .modal-box { padding: 28px 18px 24px; border-radius: 20px; }
  .form-row  { grid-template-columns: 1fr; gap: 0; }
}