/* ═══════════════════════════════════════════════════════════
   formulario.css — Estilos del formulario multi-paso
   Se carga DESPUÉS de styles.css para sobreescribir donde sea necesario
   ═══════════════════════════════════════════════════════════ */

/* ── SECTION: sobreescribe el fondo plano de styles.css ── */
.cotizar-section {
  background: #2347A5;
  padding: 5rem 1.5rem 6rem;
}
.cotizar-inner { max-width: 640px; }

/* ── HEADING BADGE ── */
.cotizar-section .hero-kicker { color: #A8C4F4; }
.cotizar-section .hero-kicker .dot { background: #A8C4F4; }
.cotizar-section .section-title em { color: #A8C4F4; }
.cotizar-section .section-sub {
  color: rgba(255,255,255,.6); font-size: 0.92rem;
  text-align: center; margin-bottom: 2.6rem; line-height: 1.65;
}

/* ── FORM CARD ── */
.form-card {
  background: #fff;
  border-radius: 18px;
  padding: 2.4rem 2rem;
  box-shadow: 0 12px 60px rgba(0,0,0,.35);
}

/* ── STEP INDICATOR ── */
.step-indicator {
  display: flex; align-items: flex-start; justify-content: center;
  margin-bottom: 2.2rem;
}
.step-node { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid #e2e8f0; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; color: #6b7280;
  transition: all 0.22s ease;
}
.step-label {
  font-size: 0.67rem; font-weight: 600; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.06em;
  white-space: nowrap; transition: color 0.22s ease;
}
.step-connector {
  flex: 1; max-width: 72px; height: 2px;
  background: #e2e8f0; margin: 17px 8px 0;
  transition: background 0.22s ease;
}
.step-node.active .step-circle { background: var(--blue); border-color: var(--blue); color: #fff; }
.step-node.active .step-label  { color: var(--blue); }
.step-node.done   .step-circle { background: #10b981; border-color: #10b981; color: #fff; }
.step-connector.done { background: #10b981; }

/* ── PASOS ── */
.form-step { display: none; }
.form-step.active { display: block; animation: slideIn .28s ease; }

/* ── FIELDS (scopeados a .form-card para no romper el resto) ── */
.form-card label {
  font-size: 0.81rem; font-weight: 600;
  color: #1a1a2e; letter-spacing: 0.01em;
}
.form-card label .req { color: #e53e3e; margin-left: 2px; }

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card input[type="number"],
.form-card select,
.form-card textarea {
  width: 100%; padding: 0.68rem 0.9rem;
  border: 1.5px solid #e2e8f0; border-radius: 8px;
  font-family: var(--font-body); font-size: 0.88rem; color: #1a1a2e;
  background: #fff;
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
  -webkit-appearance: none; appearance: none;
}
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(35,71,165,.1);
}
.form-card input.err,
.form-card select.err,
.form-card textarea.err { border-color: #e53e3e !important; }
.form-card .err-msg { font-size: 0.73rem; color: #e53e3e; margin-top: -0.1rem; display: block; }
.form-card textarea { resize: vertical; min-height: 96px; }
.form-card select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; padding-right: 2.4rem;
}
.form-card .form-row { gap: 0.9rem; margin-bottom: 0.9rem; }
.form-card .form-group { gap: 0.38rem; margin-bottom: 0.9rem; }
.form-card .form-group:last-child { margin-bottom: 0; }

/* ── DIVIDER ── */
.divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.3rem 0 1rem;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.divider span {
  font-size: 0.7rem; font-weight: 700; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.09em; white-space: nowrap;
}

/* ── RADIO PILLS ── */
.pills { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.pill {
  padding: 0.48rem 1.05rem; border: 1.5px solid #e2e8f0; border-radius: 99px;
  cursor: pointer; font-size: 0.83rem; font-weight: 500;
  color: #6b7280; background: #fff;
  transition: all 0.22s ease; user-select: none;
  -webkit-appearance: none; appearance: none; font-family: var(--font-body);
}
.pill:hover:not(.on) { border-color: var(--blue-light); color: var(--blue); }
.pill.on { border-color: var(--blue); background: var(--blue); color: #fff; font-weight: 600; }

/* ── TOGGLE SÍ/NO ── */
.toggle { display: flex; border: 1.5px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.tog {
  flex: 1; padding: 0.65rem 1rem; text-align: center; cursor: pointer;
  font-size: 0.86rem; font-weight: 500; color: #6b7280;
  background: #fff; transition: all 0.22s ease;
  border: none; font-family: var(--font-body);
}
.tog:first-child { border-right: 1.5px solid #e2e8f0; }
.tog.on { background: var(--blue); color: #fff; font-weight: 600; }
.tog:hover:not(.on) { background: #f8fafc; }

/* ── CHECKBOXES ── */
.check-grid { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, auto); grid-auto-flow: column; gap: 0.45rem; }
.check-item {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.58rem 0.75rem; border: 1.5px solid #e2e8f0; border-radius: 8px;
  cursor: pointer; transition: all 0.22s ease; user-select: none;
}
.check-item:hover { border-color: var(--blue-light); background: #f8f9ff; }
.check-item.on { border-color: var(--blue); background: #eef3fd; }
.check-item input { width: 15px; height: 15px; accent-color: var(--blue); flex-shrink: 0; pointer-events: none; }
.check-item span { font-size: 0.8rem; font-weight: 500; color: #1a1a2e; }

/* ── SECCIONES CONDICIONALES ── */
.cond { display: none; overflow: hidden; margin-top: 0.7rem; }
.cond.show { display: block; animation: slideIn .22s ease; }

/* ── STEP CHIP ── */
.step-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; font-weight: 700;
  color: var(--blue); letter-spacing: 0.04em; text-transform: uppercase;
  background: #eef3fd; padding: 0.28rem 0.85rem;
  border-radius: 20px; margin-bottom: 1.3rem;
}

/* ── SERVICE CARDS ── */
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.svc-btn {
  -webkit-appearance: none; appearance: none;
  background: #fff; font-family: var(--font-body);
  border: 2px solid #e2e8f0; border-radius: 10px;
  padding: 1.3rem 1rem 1.1rem;
  cursor: pointer; text-align: center;
  transition: all 0.22s ease; position: relative; width: 100%;
}
.svc-btn:hover { border-color: var(--blue-light); background: #f0f5ff; }
.svc-btn.selected { border-color: var(--blue); background: #eef3fd; }
.svc-check {
  position: absolute; top: 8px; right: 9px;
  width: 20px; height: 20px; background: var(--blue); color: #fff;
  border-radius: 50%; font-size: 0.65rem; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}
.svc-btn.selected .svc-check { display: flex; }
.svc-icon { width: 2.5rem; height: 2.5rem; display: block; margin: 0 auto 0.6rem; color: var(--blue); }
.svc-icon svg { width: 100%; height: 100%; }
.svc-title { font-weight: 700; font-size: 0.88rem; color: #1a1a2e; margin-bottom: 0.25rem; }
.svc-desc  { font-size: 0.73rem; color: #6b7280; line-height: 1.4; }

/* ── BOTONES (scopeados a form-card y modal-box) ── */
.form-card .btn-primary,
.modal-box .btn-primary {
  width: 100%; padding: 0.82rem 1.8rem;
  background: var(--blue); color: #fff;
  border: none; border-radius: 99px;
  font-family: var(--font-body); font-size: 0.93rem; font-weight: 700;
  cursor: pointer; letter-spacing: 0.01em;
  transition: background 0.22s ease, transform 0.22s ease;
  margin-top: 1.3rem; display: block; text-align: center; text-decoration: none;
}
.form-card .btn-primary:hover,
.modal-box .btn-primary:hover { background: var(--blue-mid); transform: translateY(-1px); }
.form-card .btn-primary:active,
.modal-box .btn-primary:active { transform: none; }
.form-card .btn-primary:disabled,
.modal-box .btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.form-card .btn-primary.ready,
.modal-box .btn-primary.ready { background: #059669; }
.form-card .btn-primary.ready:hover,
.modal-box .btn-primary.ready:hover { background: #047857; }

.btn-back {
  padding: 0.68rem 1.4rem; background: none;
  border: 1.5px solid #e2e8f0; border-radius: 99px; color: #6b7280;
  font-family: var(--font-body); font-size: 0.86rem; font-weight: 500;
  cursor: pointer; transition: all 0.22s ease;
}
.btn-back:hover { border-color: var(--blue); color: var(--blue); }
.btn-back.ready { background: #10b981; border-color: #10b981; color: #fff; font-weight: 600; }
.btn-back.ready:hover { background: #059669; border-color: #059669; color: #fff; }

.btn-row { display: flex; gap: 0.7rem; align-items: center; margin-top: 1.3rem; }
.btn-row .form-card .btn-primary { flex: 1; margin-top: 0; }

/* ── BOTÓN GOOGLE CALENDAR ── */
.btn-gcal {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--blue); color: #fff;
  border-radius: 99px; font-family: var(--font-body);
  font-size: 0.86rem; font-weight: 600;
  padding: 0.62rem 1.6rem; border: none;
  cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  letter-spacing: normal; text-transform: none;
}
.btn-gcal:hover {
  background: var(--blue-mid); transform: translateY(-1px);
}

/* ── PRIVACIDAD + SPINNER ── */
.form-card .privacy {
  text-align: center; font-size: 0.73rem; color: #6b7280;
  margin-top: 0.9rem; line-height: 1.5;
}
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .7s linear infinite; vertical-align: middle; margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SUCCESS ── */
.success-panel { display: none; text-align: center; padding: 1.5rem 1rem 0.5rem; animation: slideIn .35s ease; }
.success-panel.show { display: block; }
.success-icon {
  width: 66px; height: 66px; background: #d1fae5; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem; color: #059669;
}
.success-icon svg { width: 32px; height: 32px; }
.success-title { font-family: var(--font-serif); font-size: 1.55rem; font-weight: 600; color: #1a1a2e; margin-bottom: 0.6rem; }
.success-msg { font-size: 0.9rem; color: #6b7280; line-height: 1.65; }

/* ── AGENDA ── */
.agenda-wrap {
  margin-top: 1.4rem; padding: 1.2rem 1.3rem;
  border-radius: 10px; border: 1.5px dashed #e2e8f0; background: #f8fafc;
}
.agenda-eyebrow { font-size: 0.64rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.45rem; }
.agenda-title { font-family: var(--font-serif); font-size: 0.97rem; font-weight: 600; color: #1a1a2e; margin-bottom: 0.35rem; line-height: 1.35; }
.agenda-desc { font-size: 0.8rem; color: #6b7280; line-height: 1.6; margin-bottom: 1rem; }

/* ── GCAL EN 2B ── */
.gcal-ed-section {
  margin-top: 0.5rem; padding: 1rem 1.1rem;
  border-radius: 10px; border: 1.5px dashed #e2e8f0; background: #f8fafc;
}
.gcal-ed-title { font-size: 0.88rem; font-weight: 600; color: #1a1a2e; margin-bottom: 0.3rem; }
.gcal-ed-desc  { font-size: 0.79rem; color: #6b7280; line-height: 1.6; margin-bottom: 0.8rem; }

/* ── MODALES ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(8,22,40,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
  overflow-y: auto;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: #fff; border-radius: 16px;
  padding: 2rem 2rem 1.6rem; max-width: 480px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  transform: scale(0.95); transition: transform 0.25s;
  margin: auto; position: relative;
}
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-icon {
  width: 3rem; height: 3rem;
  display: block; margin-bottom: 0.9rem;
  color: var(--blue);
}
.modal-icon svg { width: 100%; height: 100%; }
.modal-title {
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600;
  color: #1a1a2e; margin-bottom: 0.7rem; line-height: 1.3;
}
.modal-body { font-size: 0.86rem; color: #6b7280; line-height: 1.65; margin-bottom: 1rem; }
.modal-steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.1rem; }
.modal-steps li { font-size: 0.84rem; color: #1a1a2e; line-height: 1.5; padding-left: 1.8rem; position: relative; }
.modal-steps li::before {
  content: attr(data-n);
  position: absolute; left: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; top: 1px;
}
.modal-note {
  font-size: 0.76rem; color: #6b7280;
  background: #f8fafc; border-left: 3px solid #A8C4F4;
  padding: 0.65rem 0.9rem; border-radius: 0 6px 6px 0;
  line-height: 1.6; margin-bottom: 1.2rem;
}
.modal-close-x {
  position: absolute; top: 0.9rem; right: 1rem;
  background: none; border: none; cursor: pointer;
  font-size: 1.25rem; color: #6b7280; line-height: 1;
  padding: 0.25rem 0.4rem; border-radius: 4px; transition: color 0.22s ease, background 0.22s ease;
}
.modal-close-x:hover { color: #1a1a2e; background: #f8fafc; }
.modal-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.modal-actions .btn-back { text-align: center; }

/* ── UPLOAD EN MODAL ── */
.upload-section {
  background: #f8fafc; border: 1.5px dashed #e2e8f0;
  border-radius: 8px; padding: 1rem 1.1rem; margin-bottom: 1.2rem;
}
.upload-title { font-size: 0.8rem; font-weight: 700; color: #1a1a2e; margin-bottom: 0.8rem; }
.upload-item { margin-bottom: 0.65rem; }
.upload-item:last-child { margin-bottom: 0; }
.upload-label { font-size: 0.77rem; font-weight: 600; color: #6b7280; display: block; margin-bottom: 0.25rem; }
.upload-label span { font-weight: 400; }
.upload-input {
  width: 100%; font-size: 0.8rem; color: #1a1a2e;
  padding: 0.42rem 0.75rem; border: 1.5px solid #e2e8f0;
  border-radius: 6px; background: #fff; cursor: pointer;
  font-family: var(--font-body);
}
.upload-input::-webkit-file-upload-button {
  background: var(--blue); color: #fff; border: none;
  border-radius: 4px; padding: 0.25rem 0.7rem; font-size: 0.75rem;
  font-weight: 600; cursor: pointer; margin-right: 0.6rem;
  font-family: var(--font-body);
}
.upload-err {
  font-size: 0.75rem; color: #dc2626;
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 6px; padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem; display: none; line-height: 1.5;
}
.upload-err.show { display: block; }

/* ── CONTRATO CHECKBOX ── */
.contract-agree {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.75rem 0.85rem; border: 1.5px solid #e2e8f0;
  border-radius: 8px; background: #fff; cursor: pointer;
  transition: all 0.22s ease; margin-bottom: 0;
}
.contract-agree:hover { border-color: var(--blue-light); }
.contract-agree.confirmed { border-color: #10b981; background: #f0fdf4; }
.contract-agree input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: #10b981; flex-shrink: 0; margin-top: 2px; cursor: pointer;
}
.contract-agree-text { font-size: 0.81rem; color: #1a1a2e; line-height: 1.5; }
.contract-confirmed-note {
  display: none; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; font-weight: 700; color: #065f46; margin-top: 0.35rem;
}

/* ── MODAL WARNING PANEL ── */
.modal-warning {
  display: none;
  background: #fffbeb; border: 1.5px solid #f59e0b;
  border-radius: 10px; padding: 1.2rem 1.3rem; margin-bottom: 1rem;
}
.modal-warning.show { display: block; animation: slideIn .22s ease; }
.modal-warning-icon {
  width: 2.4rem; height: 2.4rem; margin: 0 auto 0.7rem;
  display: flex; align-items: center; justify-content: center;
  background: #fef3c7; border-radius: 50%; color: #d97706;
}
.modal-warning-icon svg { width: 1.3rem; height: 1.3rem; }
.modal-warning-title { font-weight: 700; font-size: 0.9rem; color: #92400e; margin-bottom: 0.45rem; text-align: center; }
.modal-warning-text  { font-size: 0.82rem; color: #78350f; line-height: 1.65; text-align: center; }
.modal-warning-actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.modal-warning-actions .modal-box .btn-primary { margin-top: 0; }

/* ── PREVIEW ARCHIVOS ADJUNTOS ── */
.archivos-adjuntos {
  display: none; flex-direction: column; gap: 0.35rem;
  background: #f0fdf4; border: 1.5px solid #86efac;
  border-radius: 8px; padding: 0.7rem 1rem; margin-top: 0.6rem;
}
.archivos-adjuntos.show { display: flex; }
.archivos-adjuntos-title {
  font-size: 0.73rem; font-weight: 700; color: #065f46;
  margin-bottom: 0.2rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.archivo-item { display: flex; align-items: center; gap: 0.5rem; line-height: 1.3; }
.archivo-check {
  width: 18px; height: 18px; border-radius: 50%;
  background: #10b981; color: #fff;
  font-size: 0.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.archivo-name {
  font-size: 0.78rem; color: #065f46; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px;
}

/* ── CONFIDENCIAL BADGE ── */
.confidencial-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #eef3fd; color: var(--blue);
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.28rem 0.75rem; border-radius: 20px;
  border: 1px solid #c7d9f8; margin-top: 0.55rem;
}
.confidencial-badge svg { flex-shrink: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 520px) {
  .form-card { padding: 1.8rem 1.2rem; }
  .form-card .form-row { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; grid-template-rows: unset; grid-auto-flow: row; }
}
