/* ============================================================
   Risko Cotizador — components.css
   Botones, login, stepper, modales, overlay de carga.
   Idéntico a Blink en lo reutilizable.
   ============================================================ */

/* ── Botones ────────────────────────────────────────────────  */
.btn-primary {
  width: 100%; background: var(--btn-primario-bg); color: var(--btn-primario-text);
  border: none; padding: 11px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: inherit; transition: background .15s;
}
.btn-primary:hover { background: var(--btn-primario-hover); }

.btn-next {
  background: var(--btn-avance-bg); color: var(--btn-primario-text);
  border: none; padding: 12px 32px; border-radius: var(--r);
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 1px 3px rgba(78,203,160,.35);
  font-family: inherit; transition: all .15s;
}
.btn-next:hover:not(:disabled) { background: var(--btn-avance-hover); transform: translateY(-1px); }
.btn-next:disabled { opacity: .5; cursor: not-allowed; }
.btn-next--danger { background: var(--btn-danger-bg); }
.btn-next--danger:hover:not(:disabled) { background: var(--btn-danger-hover); }

.btn-back {
  background: var(--btn-primario-bg); color: var(--btn-primario-text);
  border: none; padding: 12px 28px; border-radius: var(--r);
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; transition: all .15s;
}
.btn-back:hover { background: var(--btn-primario-hover); transform: translateY(-1px); }

.btn-sec {
  background: var(--btn-sec-bg); color: var(--btn-sec-text);
  border: 1px solid var(--btn-sec-border);
  padding: 8px 14px; border-radius: var(--r-sm);
  font-size: 13px; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
  transition: background .15s;
}
.btn-sec:hover { background: var(--bg); }

.btn-row {
  display: flex; gap: 12px; justify-content: center;
  flex-wrap: wrap; margin-top: .5rem; margin-bottom: 1rem;
}
.btn-row.space-between { justify-content: space-between; }
.btn-row.center        { justify-content: center; }

/* ── Login ──────────────────────────────────────────────────  */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - 56px); padding: 2rem;
}
.login-card {
  background: var(--card); border-radius: var(--r-xl);
  border: 1px solid var(--border); padding: 2.5rem;
  width: 100%; max-width: 380px;
  text-align: center; box-shadow: var(--shadow);
}
.login-brand-row {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 1.25rem;
}
.login-brand-row .logo { display: inline-block; height: 36px; }
.login-brand-row .logo img { display: block; }
.login-card h2   { font-size: 19px; font-weight: 600; margin-bottom: 0; }
.login-card .sub { font-size: 13px; color: var(--text-sec); margin-bottom: 1.5rem; }
.login-card .link-sm { font-size: 12px; }
.err {
  color: var(--danger); font-size: 12px; margin-top: .5rem; display: none;
  background: var(--danger-light); padding: 6px 10px; border-radius: var(--r-sm);
}
.err.visible { display: block; }

/* ── Stepper ────────────────────────────────────────────────  */
.stepper {
  display: flex; align-items: center; margin-bottom: 1.5rem;
  background: var(--card); border-radius: var(--r-lg);
  border: 1px solid var(--border); padding: 1rem 1.25rem;
  justify-content: center;
}
.step {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; flex: 1; position: relative;
}
.step:not(:last-child)::after {
  content: ''; position: absolute; right: -50%; top: 16px;
  width: 100%; height: 1px; background: var(--border);
}
.step-circle {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  border: 2px solid var(--border); background: var(--bg); color: var(--text-sec);
  position: relative; z-index: 1; transition: all .2s;
}
.step.active .step-circle { border-color: var(--bp); background: var(--bp); color: white; }
.step.done   .step-circle { border-color: var(--success); background: var(--success); color: white; }
.step-label  { font-size: 11px; color: var(--text-sec); text-align: center; font-weight: 500; }
.step.active .step-label  { color: var(--bp); font-weight: 600; }

/* ── Form box ───────────────────────────────────────────────  */
.form-box {
  background: var(--card); border-radius: var(--r-lg);
  border: 1px solid var(--border); padding: 1.5rem; margin-bottom: 1.25rem;
}
.form-box h3 {
  font-size: 15px; font-weight: 600; margin-bottom: 1rem;
  color: var(--text); display: flex; align-items: center; gap: 6px;
}
.section { padding: var(--space-lg); max-width: 960px; margin: 0 auto; }
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 1rem; }

/* ── Modales ────────────────────────────────────────────────  */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.45); z-index: 9998;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white; border-radius: var(--r-xl);
  padding: 2rem; width: 100%; box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-box--sm { max-width: 380px; }
.modal-box--lg { max-width: 560px; }
.modal-titulo  { font-size: 16px; font-weight: 600; margin-bottom: 1.25rem; }
.popup-confirm-titulo { font-size: 16px; font-weight: 600; margin-bottom: .75rem; }
.popup-confirm-msg    { font-size: 13px; color: var(--text-sec); margin-bottom: 1.5rem; }

/* ── Overlay de carga ───────────────────────────────────────  */
.overlay-carga {
  display: none; position: fixed; inset: 0;
  background: rgba(44,44,42,.55);
  align-items: center; justify-content: center; z-index: 9999;
}
.overlay-carga.visible { display: flex; }
.overlay-carga-box {
  background: var(--card); border-radius: 14px;
  padding: 2rem 2.5rem;
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
}
.overlay-carga-box i { font-size: 32px; color: var(--bp); }
.overlay-carga-box p { font-size: 14px; color: var(--text); font-weight: 500; margin: 0; }
