/* ================================================================
   MODAL V4 — Quran Academy
   Black / Emerald / Gold — compact, mobile-first, 4-step wizard
================================================================ */
:root {
  --bk:  #050909;
  --bk2: #080e0e;
  --bk3: #0c1616;
  --bk4: #111e1e;
  --go:  #d4af37;
  --go2: #f0c747;
  --em:  #1a6b45;
  --em2: #0f4a2e;
  --em3: #0a3320;
  --rad: 20px;
}

/* ================================================================
   TEASER POPUP
   — same proportions as the wizard, centered, polished
================================================================ */
.ql-overlay {
  position: fixed; inset: 0; z-index: 99990;
  background: rgba(0,0,0,.82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; visibility: hidden;
  transition: opacity .38s ease, visibility .38s ease;
}
.ql-overlay.ql-open { opacity: 1; visibility: visible; }

.ql-card {
  position: relative;
  width: 100%; max-width: 500px;          /* matches wizard width */
  background: linear-gradient(155deg, var(--bk3) 0%, var(--bk) 100%);
  border: 1px solid rgba(212,175,55,.2);
  border-radius: var(--rad);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(212,175,55,.06), 0 32px 80px rgba(0,0,0,.85);
  transform: translateY(24px) scale(.96);
  transition: transform .42s cubic-bezier(.34,1.56,.64,1);
}
.ql-overlay.ql-open .ql-card { transform: translateY(0) scale(1); }

/* Green top band — matches wizard header feel */
.ql-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--em2), var(--go), var(--em2));
}

/* Close — top-right, no overlap */
.ql-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  color: rgba(255,255,255,.5); font-size: .76rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .22s;
  /* ensure nothing overlaps it */
  flex-shrink: 0;
}
.ql-close:hover { background: rgba(212,175,55,.18); border-color: rgba(212,175,55,.4); color: var(--go); }

.ql-inner { padding: 22px 24px 24px; }

.ql-logo-img { height: 34px; width: auto; display: block; margin-bottom: 14px; }

.ql-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.32);
  border-radius: 20px; padding: 4px 12px;
  font-size: .68rem; font-weight: 700; color: var(--go);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 12px;
}

.ql-title {
  font-family:var(--font-display);
  font-size: 1.55rem; font-weight: 700;
  color: #fff; line-height: 1.22; margin: 0 0 6px;
  padding-right: 28px;           /* keep clear of close btn */
}
.ql-title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--go), var(--go2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ql-sub { font-size: .76rem; color: rgba(255,255,255,.42); margin-bottom: 18px; }

/* 4-perk grid — 2×2 */
.ql-perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.ql-perk {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; padding: 11px 12px;
}
.ql-pico {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--em2), var(--em3));
  display: flex; align-items: center; justify-content: center;
  font-size: .84rem; color: var(--go);
}
.ql-perk div strong { display: block; font-size: .74rem; font-weight: 700; color: #fff; line-height: 1.3; }
.ql-perk div span  { font-size: .67rem; color: rgba(255,255,255,.36); }

.ql-cta {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--go), var(--go2));
  color: var(--bk); border: none; border-radius: 12px;
  font-size: .92rem; font-weight: 800; font-family: 'Poppins', sans-serif;
  cursor: pointer; transition: all .25s;
  box-shadow: 0 6px 22px rgba(212,175,55,.35);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 10px;
}
.ql-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(212,175,55,.5); }

.ql-skip {
  display: block; width: 100%; text-align: center;
  font-size: .74rem; color: var(--go2);
  cursor: pointer; background: none; border: none;
  transition: color .2s; padding: 0; margin-bottom: 12px;
}
.ql-skip:hover { color: #ffe38a; }

.ql-note { text-align: center; font-size: .67rem; color: rgba(255,255,255,.2); }
.ql-note i { margin-right: 3px; }

/* Mobile teaser — slides from bottom */
@media (max-width: 540px) {
  .ql-overlay { padding: 0; align-items: flex-end; }
  .ql-card { border-radius: 18px 18px 0 0; max-width: 100%;
    transform: translateY(100%); }
  .ql-overlay.ql-open .ql-card { transform: translateY(0); }
  .ql-card::after { content: ''; display: block; width: 36px; height: 3px;
    background: rgba(255,255,255,.15); border-radius: 3px;
    position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 20; }
  .ql-perks { grid-template-columns: 1fr; gap: 6px; }
  .ql-inner { padding: 20px 18px 22px; }
  .ql-title { font-size: 1.32rem; }
}


/* ================================================================
   BOOKING WIZARD MODAL
================================================================ */
.qm-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.86); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 14px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.qm-overlay.qm-open { opacity: 1; visibility: visible; }

.qm-card {
  width: 100%; max-width: 500px; max-height: 92vh;
  background: linear-gradient(160deg, var(--bk3) 0%, var(--bk) 60%, var(--bk2) 100%);
  border: 1px solid rgba(212,175,55,.14);
  border-radius: var(--rad); overflow: hidden;
  display: flex; flex-direction: column; position: relative;
  box-shadow: 0 0 0 1px rgba(212,175,55,.05), 0 40px 100px rgba(0,0,0,.9);
  transform: translateY(32px) scale(.96);
  transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.qm-overlay.qm-open .qm-card { transform: translateY(0) scale(1); }

/* Subtle tile pattern */
.qm-card::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='.4'%3E%3Crect x='15' y='15' width='50' height='50' opacity='.035'/%3E%3Crect x='15' y='15' width='50' height='50' transform='rotate(45,40,40)' opacity='.025'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 80px;
}

/* ── Header ── */
.qm-header { position: relative; z-index: 2; padding: 18px 20px 0; flex-shrink: 0; }

/* Close btn — isolated top-right, no overlap */
.qm-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.09);
  color: rgba(255,255,255,.45); font-size: .75rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .22s; line-height: 1;
}
.qm-close:hover { background: rgba(212,175,55,.15); border-color: rgba(212,175,55,.4); color: var(--go); transform: rotate(90deg); }

.qm-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-right: 36px; }
.qm-brand-logo-img { height: 28px; width: auto; display: block; }
.qm-brand-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; background: rgba(212,175,55,.1); border: 1px solid rgba(212,175,55,.24); border-radius: 20px; padding: 2px 9px; font-size: .62rem; font-weight: 700; color: var(--go); text-transform: uppercase; letter-spacing: .07em; }

.qm-title { font-family:var(--font-display); font-size: 1.38rem; font-weight: 700; color: #fff; line-height: 1.18; margin-bottom: 4px; padding-right: 36px; }
.qm-title em { font-style: normal; background: linear-gradient(135deg, var(--go), var(--go2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.qm-subtitle { font-size: .71rem; color: rgba(255,255,255,.32); margin-bottom: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.qm-dot { width: 3px; height: 3px; background: rgba(212,175,55,.35); border-radius: 50%; }

/* ── Steps (4) ── */
.qm-steps {
  display: flex; align-items: flex-start; justify-content: center;
  padding: 0 20px 12px; position: relative; z-index: 2; flex-shrink: 0;
}
.qm-step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; position: relative; }
.qm-step:not(:last-child)::after {
  content: ''; position: absolute; top: 13px;
  left: calc(50% + 13px); right: calc(-50% + 13px);
  height: 1.5px; background: rgba(255,255,255,.08); z-index: 1; transition: background .5s;
}
.qm-step.completed:not(:last-child)::after { background: linear-gradient(90deg, var(--go), rgba(212,175,55,.3)); }
.qm-step-circle {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: rgba(255,255,255,.28);
  transition: all .38s cubic-bezier(.34,1.56,.64,1); position: relative; z-index: 2; flex-shrink: 0;
}
.qm-step.active .qm-step-circle { border-color: var(--go); background: linear-gradient(135deg, var(--go), var(--go2)); color: var(--bk); box-shadow: 0 0 0 4px rgba(212,175,55,.13), 0 4px 12px rgba(212,175,55,.26); transform: scale(1.12); }
.qm-step.completed .qm-step-circle { border-color: var(--go); background: var(--go); color: var(--bk); }
.qm-step-check { display: none; }
.qm-step.completed .qm-step-check { display: inline; }
.qm-step.completed .qm-step-num  { display: none; }
.qm-step-lbl { font-size: .6rem; font-weight: 600; color: rgba(255,255,255,.22); text-align: center; transition: color .3s; white-space: nowrap; }
.qm-step.active .qm-step-lbl    { color: var(--go); }
.qm-step.completed .qm-step-lbl { color: rgba(255,255,255,.4); }

/* ── Progress bar ── */
.qm-prog-track { height: 2px; background: rgba(255,255,255,.06); position: relative; z-index: 2; flex-shrink: 0; }
.qm-prog-fill  { height: 100%; background: linear-gradient(90deg, var(--go), var(--go2)); border-radius: 2px; transition: width .5s cubic-bezier(.4,0,.2,1); box-shadow: 0 0 6px rgba(212,175,55,.4); }

/* ── Body ── */
.qm-body { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; z-index: 2; scrollbar-width: thin; scrollbar-color: rgba(212,175,55,.2) transparent; }
.qm-body::-webkit-scrollbar { width: 4px; }
.qm-body::-webkit-scrollbar-thumb { background: rgba(212,175,55,.2); border-radius: 2px; }

/* ── Panels ── */
.qm-panel { padding: 16px 20px; display: none; }
.qm-panel.qm-active { display: block; animation: qmIn .32s cubic-bezier(.4,0,.2,1) both; }
.qm-panel.qm-out    { display: block; animation: qmOut .22s ease both; }
.qm-panel.qm-back   { display: block; animation: qmBack .32s cubic-bezier(.4,0,.2,1) both; }
@keyframes qmIn   { from{opacity:0;transform:translateX(22px)} to{opacity:1;transform:none} }
@keyframes qmOut  { from{opacity:1;transform:none} to{opacity:0;transform:translateX(-22px)} }
@keyframes qmBack { from{opacity:0;transform:translateX(-22px)} to{opacity:1;transform:none} }

.qm-ptitle { font-family:var(--font-display); font-size: 1.06rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.qm-psub   { font-size: .72rem; color: rgba(255,255,255,.32); margin-bottom: 14px; }

/* ── Form fields ── */
.qm-field { margin-bottom: 10px; position: relative; }
.qm-label { display: flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.52); margin-bottom: 5px; }
.qm-label i { color: var(--go); font-size: .65rem; }
.qm-req { color: var(--go); margin-left: 1px; }

.qm-input, .qm-select, .qm-textarea {
  width: 100%; padding: 10px 13px;
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 10px; color: #fff; font-size: .83rem; font-family: 'Poppins', sans-serif;
  transition: all .24s; outline: none; -webkit-appearance: none; appearance: none; box-sizing: border-box;
}
.qm-input::placeholder, .qm-textarea::placeholder { color: rgba(255,255,255,.16); }
.qm-input:hover, .qm-select:hover { border-color: rgba(212,175,55,.22); background: rgba(255,255,255,.07); }
.qm-input:focus, .qm-select:focus, .qm-textarea:focus { border-color: var(--go); background: rgba(255,255,255,.08); box-shadow: 0 0 0 3px rgba(212,175,55,.1); }
.qm-input.qm-ok  { border-color: rgba(39,174,96,.5); }
.qm-input.qm-err { border-color: rgba(231,76,60,.55); animation: qmShake .36s; }
@keyframes qmShake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }

.qm-wrap { position: relative; }
.qm-wrap .qm-input { padding-left: 36px; }
.qm-iico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: rgba(212,175,55,.4); font-size: .78rem; pointer-events: none; transition: color .24s; }
.qm-wrap:focus-within .qm-iico { color: var(--go); }
.qm-icheck { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: #27ae60; font-size: .75rem; opacity: 0; transition: opacity .24s; pointer-events: none; }
.qm-input.qm-ok ~ .qm-icheck { opacity: 1; }

.qm-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23d4af37' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; cursor: pointer;
}
.qm-select option { background: #0a1414; color: #fff; }

.qm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.qm-textarea { resize: none; min-height: 58px; }

.qm-err:not(.qm-input) { display: flex; align-items: center; gap: 4px; font-size: .69rem; color: #e74c3c; margin-top: 3px; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .25s, opacity .25s; }
.qm-err:not(.qm-input).qm-show { max-height: 20px; opacity: 1; }
.qm-err:not(.qm-input) i { font-size: .65rem; flex-shrink: 0; }

/* ── Courses grid ── */
.qm-courses { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin-bottom: 6px; }
.qm-course {
  background: rgba(255,255,255,.04); border: 1.5px solid rgba(255,255,255,.08);
  border-radius: 12px; padding: 11px 10px; cursor: pointer;
  transition: all .24s; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  position: relative; overflow: hidden;
}
.qm-course:hover { border-color: rgba(212,175,55,.26); background: rgba(212,175,55,.05); transform: translateY(-2px); }
.qm-course.qm-sel { border-color: var(--go); background: rgba(212,175,55,.09); box-shadow: 0 0 0 1px rgba(212,175,55,.15), 0 4px 12px rgba(212,175,55,.1); }
.qm-course.qm-sel::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; top: 6px; right: 7px; font-size: .52rem; color: var(--go); width: 14px; height: 14px; background: rgba(212,175,55,.14); border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 14px; text-align: center; }
.qm-cico { width: 28px; height: 28px; background: linear-gradient(135deg, rgba(15,74,46,.65),rgba(10,51,32,.65)); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: .84rem; color: var(--go); transition: all .24s; flex-shrink: 0; }
.qm-course.qm-sel .qm-cico { background: linear-gradient(135deg, var(--go), var(--go2)); color: var(--bk); box-shadow: 0 3px 10px rgba(212,175,55,.26); }
.qm-cname { font-size: .74rem; font-weight: 700; color: rgba(255,255,255,.76); line-height: 1.2; }
.qm-course.qm-sel .qm-cname { color: var(--go2); }
.qm-cdesc { font-size: .63rem; color: rgba(255,255,255,.28); line-height: 1.3; }

/* ── Time slots ── */
.qm-tlbl { font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.44); margin-bottom: 7px; display: flex; align-items: center; gap: 5px; }
.qm-tlbl i { color: var(--go); }
.qm-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.qm-slot { display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.08); border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: all .22s; min-width: 74px; text-align: center; }
.qm-slot:hover { border-color: rgba(212,175,55,.26); background: rgba(212,175,55,.06); transform: translateY(-1px); }
.qm-slot.qm-sel { border-color: var(--go); background: rgba(212,175,55,.11); box-shadow: 0 3px 10px rgba(212,175,55,.13); }
.qm-sname { font-size: .72rem; font-weight: 600; color: rgba(255,255,255,.7); }
.qm-slot.qm-sel .qm-sname { color: var(--go2); }
.qm-stime { font-size: .61rem; color: rgba(255,255,255,.26); }
.qm-slot.qm-sel .qm-stime { color: rgba(212,175,55,.6); }

/* ── Frequency ── */
.qm-freq { display: flex; gap: 7px; margin-bottom: 4px; }
.qm-fopt { flex: 1; background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.08); border-radius: 10px; padding: 9px 5px; text-align: center; cursor: pointer; transition: all .22s; position: relative; }
.qm-fopt:hover { border-color: rgba(212,175,55,.26); }
.qm-fopt.qm-sel { border-color: var(--go); background: rgba(212,175,55,.09); }
/* Recommended badge — 5/wk */
.qm-fopt.qm-rec::before {
  content: '★ Best'; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--go), var(--go2)); color: var(--bk);
  font-size: .54rem; font-weight: 800; padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.qm-fnum { font-family:var(--font-display); font-size: 1.28rem; font-weight: 700; color: rgba(255,255,255,.55); display: block; transition: color .22s; }
.qm-fopt.qm-sel .qm-fnum { color: var(--go); }
.qm-flbl { font-size: .6rem; font-weight: 600; color: rgba(255,255,255,.26); display: block; }

/* ── Review panel ── */
.qm-jazakallah-note {
  display: flex; align-items: center; gap: 8px;
  background: rgba(26, 107, 69, 0.1); border: 1px solid rgba(26, 107, 69, 0.2);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 16px;
  font-size: .78rem; color: rgba(255,255,255,.8); line-height: 1.5;
}
.qm-jazakallah-note i { color: var(--em); flex-shrink: 0; }
.qm-jazakallah-note strong { color: var(--go); font-weight: 600; }
.qm-review-box {
  background: rgba(255,255,255,.04); border: 1px solid rgba(212,175,55,.15);
  border-radius: 14px; overflow: hidden; margin-bottom: 12px;
}
.qm-review-ttl {
  padding: 10px 14px; font-size: .67rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--go);
  background: rgba(212,175,55,.07); border-bottom: 1px solid rgba(212,175,55,.12);
}
.qm-review-row {
  display: flex; align-items: flex-start; padding: 8px 14px;
  border-bottom: 1px solid rgba(255,255,255,.04); font-size: .78rem; gap: 10px;
}
.qm-review-row:last-child { border-bottom: none; }
.qm-review-k {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.35); min-width: 108px; flex-shrink: 0; font-size: .74rem;
}
.qm-review-k i { color: rgba(212,175,55,.45); width: 12px; text-align: center; }
.qm-review-v { color: rgba(255,255,255,.82); font-weight: 500; word-break: break-word; }
.qm-review-note {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(212,175,55,.05); border: 1px solid rgba(212,175,55,.14);
  border-radius: 10px; padding: 10px 12px;
  font-size: .72rem; color: rgba(255,255,255,.44); line-height: 1.55;
}
.qm-review-note i { color: var(--go); margin-top: 2px; flex-shrink: 0; }

/* ── Footer ── */
.qm-footer {
  padding: 11px 20px 14px; display: flex; gap: 9px; align-items: center;
  flex-shrink: 0; border-top: 1px solid rgba(255,255,255,.05); position: relative; z-index: 2;
}
.qm-btn-back {
  display: flex; align-items: center; gap: 6px;
  padding: 0 14px; height: 42px;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 10px; color: rgba(255,255,255,.55); font-size: .8rem; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer; transition: all .22s; flex-shrink: 0; white-space: nowrap;
}
.qm-btn-back:hover { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.qm-btn-back[hidden] { display: none !important; }
.qm-btn-back i { font-size: .75rem; }

.qm-btn-next {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 18px; height: 42px;
  background: linear-gradient(135deg, var(--go), var(--go2));
  color: var(--bk); border: none; border-radius: 10px;
  font-size: .88rem; font-weight: 800; font-family: 'Poppins', sans-serif;
  cursor: pointer; transition: all .26s; box-shadow: 0 5px 18px rgba(212,175,55,.28);
  position: relative; overflow: hidden; white-space: nowrap;
}
.qm-btn-next::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transition: left .5s; }
.qm-btn-next:hover::before { left: 100%; }
.qm-btn-next:hover { transform: translateY(-2px); box-shadow: 0 9px 26px rgba(212,175,55,.42); }
.qm-btn-next:active { transform: scale(.98); }

/* WhatsApp green on step 4 */
.qm-btn-next.qm-btn-wa { background: linear-gradient(135deg, #25d366, #1aae55); color: #fff; box-shadow: 0 5px 18px rgba(37,211,102,.28); }
.qm-btn-next.qm-btn-wa:hover { box-shadow: 0 9px 26px rgba(37,211,102,.45); }

/* Loading spinner */
.qm-btn-next.qm-loading .qm-btxt { display: none; }
.qm-btn-next.qm-loading::after { content: ''; width: 16px; height: 16px; border: 2px solid rgba(5,9,9,.25); border-top-color: var(--bk); border-radius: 50%; animation: qmSpin .7s linear infinite; }
@keyframes qmSpin { to { transform: rotate(360deg); } }

.qm-fnote { font-size: .66rem; color: rgba(255,255,255,.2); text-align: center; padding: 0 20px 12px; position: relative; z-index: 2; }

/* ── Success screen ── */
.qm-success { padding: 32px 22px 26px; text-align: center; display: none; }
.qm-success.qm-active { display: block; animation: qmIn .38s ease both; }
.qm-sring { width: 80px; height: 80px; margin: 0 auto 18px; position: relative; }
.qm-sring svg { width: 80px; height: 80px; }
.qm-s-track { fill: none; stroke: rgba(212,175,55,.12); stroke-width: 3; }
.qm-s-arc { fill: none; stroke: var(--go); stroke-width: 3; stroke-dasharray: 226; stroke-dashoffset: 226; stroke-linecap: round; transform-origin: center; transform: rotate(-90deg); transition: stroke-dashoffset .7s cubic-bezier(.4,0,.2,1) .1s; }
.qm-success.qm-active .qm-s-arc { stroke-dashoffset: 0; }
.qm-s-ico { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0); font-size: 1.6rem; color: var(--go); opacity: 0; transition: all .4s cubic-bezier(.34,1.56,.64,1) .7s; }
.qm-success.qm-active .qm-s-ico { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.qm-s-title { font-family:var(--font-display); font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.qm-s-name { color: var(--go); }
.qm-s-msg { font-size: .8rem; color: rgba(255,255,255,.46); line-height: 1.65; margin-bottom: 8px; max-width: 340px; margin-left: auto; margin-right: auto; }
.qm-s-note { font-size: .68rem; color: rgba(255,255,255,.22); }

/* ── Confetti ── */
.qm-cf { position: absolute; width: 6px; height: 6px; border-radius: 2px; pointer-events: none; z-index: 10; animation: qmCf var(--d,1.2s) ease forwards; }
@keyframes qmCf { 0%{transform:translate(0,0) rotate(0) scale(1);opacity:1} 100%{transform:translate(var(--tx,40px),var(--ty,-120px)) rotate(var(--r,360deg)) scale(.2);opacity:0} }

/* ================================================================
   RESPONSIVE — Mobile sheet from bottom
================================================================ */
@media (max-width: 560px) {
  .qm-overlay { padding: 0; align-items: flex-end; }
  .qm-card {
    border-radius: 18px 18px 0 0; max-height: 94vh;
    transform: translateY(100%);
  }
  .qm-overlay.qm-open .qm-card { transform: translateY(0); }

  /* Mobile drag handle */
  .qm-card::after {
    content: ''; display: block; width: 36px; height: 3px;
    background: rgba(255,255,255,.14); border-radius: 3px;
    position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 20;
  }

  .qm-header  { padding: 24px 16px 0; }
  .qm-steps   { padding: 0 16px 10px; }
  .qm-panel   { padding: 14px 16px; }
  .qm-footer  { padding: 10px 16px 14px; }
  .qm-success { padding: 24px 16px 22px; }
  .qm-fnote   { padding: 0 16px 10px; }

  .qm-row { grid-template-columns: 1fr; gap: 0; }
  .qm-courses { gap: 6px; }
  .qm-title { font-size: 1.22rem; }
  .qm-slots { gap: 5px; }
  .qm-slot  { min-width: 60px; padding: 8px 8px; }
  .qm-freq  { gap: 5px; }
  .qm-btn-back span { display: none; }    /* icon only on small screens */
  .qm-btn-back { padding: 0 12px; }
}
@media (max-width: 380px) {
  .qm-courses { grid-template-columns: 1fr; }
}

/* Hide any old popup markup */
.qa-modal-overlay, .wp-overlay { display: none !important; }

/* ================================================================
   FLOATING WHATSAPP BUTTON — shared component
   Injected by modal.js into every page that loads it
================================================================ */
.wa-float {
  position: fixed; bottom: 28px; right: 26px; z-index: 9999;
  display: flex; align-items: center; flex-direction: row-reverse;
}
.wa-float a {
  display: flex; align-items: center; flex-direction: row-reverse;
  text-decoration: none;
}
.wa-bubble {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.9rem; color: white; position: relative;
  transition: transform .3s; flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(37,211,102,.5);
}
.wa-bubble:hover { transform: scale(1.1); }
.wa-bubble::before, .wa-bubble::after {
  content: ''; position: absolute; width: 100%; height: 100%;
  border-radius: 50%; border: 3px solid rgba(37,211,102,.5);
  animation: waRipple 2.5s ease-out infinite;
}
.wa-bubble::after { animation-delay: 1s; border-color: rgba(37,211,102,.28); }
@keyframes waRipple {
  0%   { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}
.wa-label {
  background: white; color: #0f6b50; font-weight: 700; font-size: .84rem;
  padding: 9px 18px 9px 22px; border-radius: 30px 0 0 30px;
  white-space: nowrap; box-shadow: -4px 0 16px rgba(0,0,0,.1);
  max-width: 0; overflow: hidden; opacity: 0;
  transition: max-width .4s cubic-bezier(.4,0,.2,1), opacity .3s, padding .3s;
  padding-right: 0;
}
.wa-float:hover .wa-label { max-width: 180px; opacity: 1; padding-right: 18px; }

/* ================================================================
   SMALL-SCREEN FIXES
   1) Popup cards are never taller than the screen. Only the inner content
      scrolls, so the close (X) button always stays on screen and tappable.
   2) Larger, higher-contrast close buttons on phones / short screens.
================================================================ */
.ql-card { display: flex; flex-direction: column; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.ql-accent { flex-shrink: 0; }
.ql-inner { overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (max-width: 560px), (max-height: 560px) {
  .ql-close, .qm-close {
    width: 40px; height: 40px; top: 10px; right: 10px; font-size: 1rem;
    background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.32); color: #fff;
  }
  .ql-title { padding-right: 46px; }
  .qm-brand, .qm-title { padding-right: 52px; }
}
