/* /css/app.modals.css — Modals (incl. Wizard overlay) */

.modal{
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: none;
  background: rgba(0,0,0,0.35);
  padding: 16px;
}

.modalBox{
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modalHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}

.modalBody{ padding: 14px; }

.sectionTitle{
  margin-top: 12px;
  margin-bottom: 6px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .3px;
  color: var(--b0);
  text-transform: uppercase;
}

/* =========================================================
   Wizard (Floating overlay) — viewport safe
   Put the “step goes under screen” fix HERE ✅
========================================================= */

.wzOverlay{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:16px;
  background:rgba(0,0,0,.35);
}

.wzModal{
  width:100%;
  max-width: 820px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow: var(--shadow);
  overflow:hidden;

  /* KEY: never exceed viewport height */
  max-height: calc(100vh - 32px);
  display:flex;
  flex-direction:column;
}

.wzHead{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid #eef2f7;
  background:#fff;
}

.wzHeadLeft{ min-width:0; }
.wzTitle{ font-weight:900; font-size:16px; line-height:1.2; }
.wzMeta{ margin-top:2px; }

.wzBody{
  padding:14px;
  overflow:auto;

  /* KEY: body scrolls, header/footer stay visible */
  flex: 1 1 auto;
  min-height: 0;
}

.wzFoot{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-top:1px solid #eef2f7;
  background:#fff;
}

/* Mobile: keep usable */
@media (max-width: 600px){
  .wzModal{ border-radius:16px; }
  .wzHead{ align-items:stretch; }
}