/* Modal styles + step list (separate to keep things tidy) */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 20, 24, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal {
  background: var(--paper);
  width: min(920px, 100%);
  max-height: 92vh;
  overflow: auto;
  position: relative;
  animation: slideUp .35s cubic-bezier(.2,.8,.2,1);
  border-radius: 6px;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) }
  to { opacity: 1; transform: translateY(0) }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  z-index: 2;
  transition: background .15s;
}
.modal-close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.modal-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 520px;
}

.modal-aside {
  background: var(--nm-teal-soft);
  color: var(--nm-navy);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-right: 1px solid var(--nm-line);
}
.modal-aside .brand-mark { border-color: var(--nm-navy); }
.modal-aside .brand-mark::before { background: var(--nm-navy); }
.modal-aside .brand-name { color: var(--nm-navy); }
.modal-aside .brand-name em { color: var(--nm-teal); }

.step-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.step-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  font-size: 14px;
  color: var(--nm-navy-500);
  border-bottom: 1px solid rgba(26,31,92,0.1);
  transition: color .2s;
}
.step-item:last-child { border-bottom: 0; }
.step-item .step-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(26,31,92,0.2);
  background: var(--paper);
  display: grid; place-items: center;
  font-family: "Open Sans", sans-serif;
  font-size: 11px;
  font-weight: 700;
}
.step-item.current { color: var(--nm-navy); font-weight: 600; }
.step-item.current .step-dot { background: var(--nm-teal); border-color: var(--nm-teal); color: white; }
.step-item.done { color: var(--nm-navy); }
.step-item.done .step-dot { background: var(--nm-teal-dark); border-color: var(--nm-teal-dark); color: white; }

.aside-footer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 11px;
  color: var(--nm-navy-500);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(26,31,92,0.12);
}

.modal .form-card,
.modal .modal-form {
  padding: 36px 40px;
  background: var(--paper);
}
.cal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: "Newsreader", serif;
  font-size: 18px;
  margin: 16px 0 14px;
  color: var(--nm-navy);
}

@media (max-width: 760px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-aside { padding: 24px; }
  .step-list { display: none; }
  .modal .form-card { padding: 28px 24px; }
}

/* Tweak overrides for palette swatches */
[data-palette="ink-teal"] {
  --bg: #F4F5F8; --bg-2: #F0F1F5; --paper: #FFFFFF;
  --ink: #1A1F5C; --ink-2: #3A4080;
  --line: #E6E8EF; --line-2: #D6D9E0;
  --accent: #169A9D;
}
[data-palette="cream-rust"] {
  --bg: #faf6ef; --bg-2: #f1ead9; --paper: #ffffff;
  --ink: #1a1612; --ink-2: #3a322a;
  --line: #e0d6c2; --line-2: #c9bda3;
  --accent: #b3543a;
}
[data-palette="mint-forest"] {
  --bg: #eef1ed; --bg-2: #e1e7df; --paper: #f7f9f6;
  --ink: #14241c; --ink-2: #2d4239;
  --line: #cbd4c9; --line-2: #aebca8;
  --accent: #43755e;
}
[data-palette="paper-cobalt"] {
  --bg: #f6f5f1; --bg-2: #eceae3; --paper: #ffffff;
  --ink: #0b1830; --ink-2: #24304a;
  --line: #d7d4ca; --line-2: #bdb9ac;
  --accent: #2a55c0;
}
[data-palette="dark"] {
  --bg: #0d1418; --bg-2: #1a2229; --paper: #1f272e;
  --ink: #ece9e1; --ink-2: #cac7bf;
  --line: #2a3138; --line-2: #3b434b;
  --accent: #6aa3a7;
}
