/* ==========================================================================
   MidPay — 9-step progressive application wizard
   Frosted-glass, mobile-first. Mirrors Midbank form-wizard architecture.
   ========================================================================== */

/* ---------- Layout root & card ---------- */
.wizard-root {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.wizard-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
}

/* ---------- Progress bar ---------- */
.wizard-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  position: relative;
}

.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #A4D233, #8DB82A);
  transition: width 0.4s ease;
  border-radius: 3px;
}

/* ---------- Body ---------- */
.wizard-body {
  padding: 32px 24px;
}

@media (max-width: 640px) {
  .wizard-body { padding: 24px 16px; }
}

/* ---------- Step header ---------- */
.wizard-step-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wizard-step-title {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.2;
}

@media (min-width: 960px) {
  .wizard-step-title { font-size: 28px; }
}

.wizard-step-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

/* ---------- Tile grid ---------- */
.tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.tile-grid .tile {
  width: calc(50% - 5px);
}

@media (min-width: 960px) {
  .tile-grid {
    gap: 12px;
  }
  .tile-grid .tile {
    width: calc(25% - 9px);
  }
}

.tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  min-height: 90px;
  font-family: inherit;
}

.tile:hover {
  border-color: rgba(164, 210, 51, 0.4);
  background: rgba(164, 210, 51, 0.05);
}

.tile.is-selected {
  border-color: #A4D233;
  background: rgba(164, 210, 51, 0.1);
  box-shadow: 0 0 20px rgba(164, 210, 51, 0.15);
}

.tile-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #A4D233;
  color: #000;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.tile.is-selected .tile-check { display: flex; }

.tile-icon {
  font-size: 28px;
  margin-bottom: 8px;
  line-height: 1;
}

.tile-label {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.tile-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* ---------- Pills ---------- */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-group.stack {
  flex-direction: column;
}

.pill {
  padding: 10px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.pill:hover {
  border-color: rgba(164, 210, 51, 0.4);
}

.pill.is-selected {
  border-color: #A4D233;
  background: rgba(164, 210, 51, 0.12);
  color: #fff;
  font-weight: 600;
}

/* ---------- Fields ---------- */
.wizard-field {
  margin-bottom: 20px;
}

.wizard-field-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  display: block;
}

.wizard-input,
.wizard-select,
.wizard-textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  box-sizing: border-box;
}

.wizard-input:focus,
.wizard-select:focus,
.wizard-textarea:focus {
  border-color: #A4D233;
}

.wizard-textarea {
  min-height: 100px;
  resize: vertical;
}

/* ---------- Footer ---------- */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wizard-back,
.wizard-next {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.wizard-back {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
}

.wizard-back:hover { color: #fff; }
.wizard-back:disabled { opacity: 0.3; cursor: not-allowed; }

.wizard-next {
  background: #A4D233;
  color: #000;
  max-width: 420px;
}

.wizard-next:hover { background: #8DB82A; }
.wizard-next:disabled { opacity: 0.4; cursor: not-allowed; }

.wizard-startover {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  cursor: pointer;
  margin-top: 12px;
  padding: 8px;
  font-family: inherit;
}

.wizard-startover:hover { color: rgba(255, 255, 255, 0.6); }

/* ---------- Inline error ---------- */
.wizard-error {
  background: rgba(255, 70, 70, 0.1);
  border: 1px solid rgba(255, 70, 70, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #ff6b6b;
  font-size: 13px;
  margin-top: 12px;
}

/* ---------- Step transitions ---------- */
@keyframes wizardSlideIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes wizardSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}

.wizard-step {
  animation: wizardSlideIn 0.25s ease;
}

.wizard-step.leaving {
  animation: wizardSlideOut 0.18s ease forwards;
}

/* ---------- Conditional sections (deep-dive accordions) ---------- */
.cond-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}

.cond-section summary {
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  font-size: 15px;
  list-style: none;
}

.cond-section summary::-webkit-details-marker { display: none; }

.cond-section[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cond-body { padding: 16px; }

/* ---------- Reco card (Step 6) ---------- */
.reco-card {
  background: rgba(164, 210, 51, 0.06);
  border: 1px solid rgba(164, 210, 51, 0.2);
  border-radius: 12px;
  padding: 24px;
}

.reco-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.reco-list {
  list-style: none;
  padding: 0;
}

.reco-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.reco-trust {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(164, 210, 51, 0.15);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- Savings (Step 7) ---------- */
.savings-display {
  text-align: center;
  padding: 24px;
}

.savings-amount-big {
  font-size: 56px;
  font-weight: 800;
  color: #A4D233;
  line-height: 1;
}

.savings-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

/* ---------- File upload ---------- */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.upload-zone:hover,
.upload-zone.is-drag {
  border-color: #A4D233;
  background: rgba(164, 210, 51, 0.04);
}

.upload-zone input[type="file"] { display: none; }

.upload-list {
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.upload-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- SSO gate (Step 8) ---------- */
.sso-gate {
  text-align: center;
  padding: 40px 24px;
}

.sso-gate h3 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.sso-gate p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

.sso-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: #A4D233;
  color: #000;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.sso-btn:hover {
  background: #8DB82A;
  transform: translateY(-1px);
}

/* ---------- Confirmation ---------- */
.wizard-confirm {
  text-align: center;
  padding: 40px 24px;
}

.confirm-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(164, 210, 51, 0.15);
  color: #A4D233;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.confirm-steps {
  list-style: none;
  padding: 0;
  text-align: left;
  max-width: 400px;
  margin: 20px auto;
}

.confirm-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}
