#ymf-fab{
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%, -50%);
  z-index:999999;

  display:flex;
  align-items:center;
  gap:10px;

  padding:14px 16px 14px 14px;
  border-radius:0 18px 18px 0;

  background:linear-gradient(135deg,#111827,#1f2937);
  color:#fff;
  font-weight:800;
  font-size:14px;
  letter-spacing:.2px;

  border:0;
  cursor:pointer;

  box-shadow:0 10px 30px rgba(0,0,0,.35);
  transition:all .25s ease;
}
#ymf-fab .ymf-icon{
  width:34px; height:34px;
  display:grid; place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  font-size:16px;
}
#ymf-fab:hover{
  padding-left:18px;
  box-shadow:0 14px 40px rgba(0,0,0,.45);
}
#ymf-fab::after{
  content:'';
  position:absolute;
  inset:-6px;
  border-radius:inherit;
  background:rgba(17,24,39,.4);
  z-index:-1;
  animation:ymf-pulse 2.4s ease-out infinite;
}
@keyframes ymf-pulse{
  0%{opacity:.5; transform:scale(.95);}
  70%{opacity:0; transform:scale(1.15);}
  100%{opacity:0;}
}

#ymf-overlay{
  position:fixed; inset:0; background:rgba(15,23,42,.55);
  z-index:999998; display:none;
}
#ymf-modal{
  position:fixed; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(560px, calc(100vw - 28px));
  max-height:calc(100vh - 24px);
  background:#fff; border-radius:18px; z-index:999999;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  display:none; overflow:hidden;
  flex-direction:column;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* Modal uses a class toggle so we can render it as flex (keeps footer visible). */
#ymf-modal.ymf-open{display:flex;}
.ymf-head{padding:18px 18px 10px;border-bottom:1px solid #eef2f7;}
.ymf-title{margin:0;font-size:18px;line-height:1.25;font-weight:850;color:#0f172a;}
.ymf-sub{margin:6px 0 0;color:#475569;font-size:13px;}
.ymf-body{padding:16px 18px 18px; flex:1; overflow:auto;}
.ymf-stepmeta{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.ymf-progress{height:8px;border-radius:999px;background:#eef2f7;overflow:hidden;flex:1;margin-right:10px;}
.ymf-progress > div{height:100%;background:#111827;width:0%;}
.ymf-stepcount{font-size:12px;color:#475569;white-space:nowrap;}
.ymf-row{margin-bottom:12px;}
.ymf-row label{display:block;font-size:13px;font-weight:700;margin-bottom:6px;color:#0f172a;}
.ymf-help{font-size:12px;color:#64748b;margin-top:6px;}
.ymf-row input,.ymf-row textarea,.ymf-row select{
  width:100%;padding:10px 11px;border-radius:12px;border:1px solid #e2e8f0;outline:none;
}
.ymf-row textarea{min-height:96px;resize:vertical;}

/* Review/submit step: keep long question lists scrollable */
.ymf-review{display:flex;flex-direction:column;}
.ymf-summary{
  max-height:40vh;
  overflow:auto;
  padding-right:6px;
}
.ymf-actions{
  display:flex;gap:10px;justify-content:space-between;align-items:center;
  padding:14px 18px;border-top:1px solid #eef2f7;background:#fafafa;
}
.ymf-actions .left{display:flex;gap:10px;}
.ymf-btn{border:0;cursor:pointer;border-radius:12px;padding:10px 12px;font-weight:750;}
.ymf-btn.primary{background:#111827;color:#fff;}
.ymf-btn.ghost{background:transparent;color:#0f172a;}
.ymf-btn:disabled{opacity:.6;cursor:not-allowed;}
.ymf-stars{display:flex;gap:6px;flex-wrap:wrap;}
.ymf-star{
  width:40px;height:40px;display:grid;place-items:center;
  border-radius:12px;border:1px solid #e2e8f0;cursor:pointer;user-select:none;
  font-size:18px;
}
.ymf-star.active{border-color:#111827;background:#111827;color:#fff;}
.ymf-error{
  display:none;margin-top:10px;padding:10px 12px;border-radius:14px;
  background:#fff1f2;border:1px solid #fecdd3;color:#881337;font-size:13px;
}
.ymf-success{
  padding:12px;border-radius:14px;background:#ecfeff;border:1px solid #a5f3fc;color:#083344;font-size:13px;
}
.ymf-code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-weight:850;letter-spacing:.5px;}
.ymf-closex{
  position:absolute; right:12px; top:12px; width:34px; height:34px;
  border-radius:12px; border:1px solid #e2e8f0; background:#fff; cursor:pointer;
  display:grid; place-items:center; font-size:18px; color:#0f172a;
}

/* Review step: keep the action buttons visible even with many questions */
.ymf-review{display:flex;flex-direction:column;gap:0;}
.ymf-summary{overflow:auto;max-height:45vh;padding-right:6px;}


/* Footer close icon button (replaces top-right X) */
.ymf-iconbtn{
  width:40px;
  height:40px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
  border-radius:12px;
}


/* Coupon row + copy button */
.ymf-coupon{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.ymf-code{
  font-weight:700;
  padding:4px 10px;
  border-radius:10px;
  background:rgba(17,24,39,.08);
}
.ymf-copied{
  font-size:13px;
  opacity:.8;
}
