/* ==========================================================================
   BM Withdraw - self-contained, theme-friendly styling.
   Everything is scoped under .bm-wd so it cannot leak into the theme.
   The accent colour is injected inline as --bm-accent.
   ========================================================================== */

.bm-wd {
  --bm-accent: #1f6feb;
  --bm-accent-ink: #ffffff;
  --bm-border: #e4e7ec;
  --bm-muted: #667085;
  --bm-bg-soft: #f8fafc;
  --bm-ink: #1d2433;
  --bm-radius: 14px;
  --bm-shadow: 0 1px 2px rgba(16,24,40,.05), 0 8px 28px rgba(16,24,40,.06);

  max-width: 680px;
  margin: 2.5rem auto;
  padding: 0 1rem;
  color: var(--bm-ink);
  font-size: 16px;
  line-height: 1.55;
  box-sizing: border-box;
}
.bm-wd *, .bm-wd *::before, .bm-wd *::after { box-sizing: border-box; }

/* ---- card --------------------------------------------------------------- */
.bm-wd__card {
  background: #fff;
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  box-shadow: var(--bm-shadow);
  padding: 2rem 2rem 1.75rem;
}
.bm-wd__title { margin: 0 0 .35rem; font-size: 1.5rem; line-height: 1.25; font-weight: 700; }
.bm-wd__lead { margin: 0 0 1.5rem; color: var(--bm-muted); }
.bm-wd__lead :last-child { margin-bottom: 0; }

/* ---- step indicator ----------------------------------------------------- */
.bm-wd__steps {
  display: flex; list-style: none; margin: 0 0 1.75rem; padding: 0;
  counter-reset: bmstep; gap: .25rem;
}
.bm-wd__steps li {
  flex: 1; position: relative; text-align: center;
  font-size: .78rem; color: var(--bm-muted); padding-top: 2.4rem;
}
.bm-wd__steps li::before {
  counter-increment: bmstep; content: counter(bmstep);
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--bm-border); color: var(--bm-muted);
  font-weight: 700; z-index: 1;
}
.bm-wd__steps li::after {
  content: ""; position: absolute; top: .9rem; left: -50%; width: 100%;
  height: 2px; background: var(--bm-border);
}
.bm-wd__steps li:first-child::after { display: none; }
.bm-wd__steps li.is-active::before { border-color: var(--bm-accent); color: var(--bm-accent); }
.bm-wd__steps li.is-done::before {
  background: var(--bm-accent); border-color: var(--bm-accent);
  color: var(--bm-accent-ink); content: "\2713";
}
.bm-wd__steps li.is-done::after,
.bm-wd__steps li.is-active::after { background: var(--bm-accent); }
.bm-wd__steps li.is-active, .bm-wd__steps li.is-done { color: var(--bm-ink); font-weight: 600; }

/* ---- form --------------------------------------------------------------- */
.bm-wd__field { margin-bottom: 1.1rem; }
.bm-wd__field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.bm-wd__field input[type="text"],
.bm-wd__field input[type="email"] {
  width: 100%; padding: .7rem .85rem; font-size: 1rem; color: var(--bm-ink);
  border: 1px solid var(--bm-border); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.bm-wd__field input:focus {
  outline: none; border-color: var(--bm-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-accent) 18%, transparent);
}
.bm-wd__hint { display: block; margin-top: .35rem; font-size: .82rem; color: var(--bm-muted); }

/* honeypot - hidden from humans, visible to dumb bots */
.bm-wd__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---- order meta --------------------------------------------------------- */
.bm-wd__meta {
  background: var(--bm-bg-soft); border: 1px solid var(--bm-border);
  border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1.25rem; font-size: .95rem;
}
.bm-wd__meta p { margin: .15rem 0; }
.bm-wd__warn { color: #b54708; }

/* ---- scope + product picker -------------------------------------------- */
.bm-wd__scope { border: 0; margin: 0 0 1.25rem; padding: 0; }
.bm-wd__scope legend { font-size: 1rem; font-weight: 700; margin-bottom: .6rem; padding: 0; }
.bm-wd__seg { display: flex; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.bm-wd__seg label {
  flex: 1; min-width: 160px; cursor: pointer; border: 1px solid var(--bm-border);
  border-radius: 10px; padding: .7rem .85rem; display: flex; align-items: center; gap: .55rem;
  font-weight: 600; transition: border-color .15s, background .15s;
}
.bm-wd__seg label:hover { border-color: var(--bm-accent); }
.bm-wd__seg input { accent-color: var(--bm-accent); }

.bm-wd__items { display: grid; gap: .5rem; margin-top: .25rem; }
.bm-wd__item {
  display: flex; align-items: center; gap: .65rem; cursor: pointer;
  border: 1px solid var(--bm-border); border-radius: 10px; padding: .65rem .85rem;
  transition: border-color .15s, background .15s;
}
.bm-wd__item:hover { border-color: var(--bm-accent); background: var(--bm-bg-soft); }
.bm-wd__item input { accent-color: var(--bm-accent); width: 1.05rem; height: 1.05rem; }
.bm-wd__item-name { font-weight: 600; }
.bm-wd__item-ref { color: var(--bm-muted); font-size: .85em; }
.bm-wd__item-qty { margin-left: auto; color: var(--bm-muted); white-space: nowrap; }

/* ---- buttons ------------------------------------------------------------ */
.bm-wd__actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.bm-wd__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--bm-accent); color: var(--bm-accent-ink); border: 1px solid var(--bm-accent);
  font: inherit; font-weight: 700; padding: .8rem 1.4rem; border-radius: 10px;
  cursor: pointer; text-decoration: none; transition: filter .15s, transform .02s;
}
.bm-wd__btn:hover { filter: brightness(.94); color: var(--bm-accent-ink); }
.bm-wd__btn:active { transform: translateY(1px); }
.bm-wd__btn--ghost { background: #fff; color: var(--bm-ink); border-color: var(--bm-border); }
.bm-wd__btn--ghost:hover { color: var(--bm-ink); border-color: var(--bm-muted); filter: none; }
.bm-wd__btn--block { width: 100%; }
.bm-wd__link { color: var(--bm-muted); text-decoration: underline; font-size: .95rem; }

/* ---- statement / alerts ------------------------------------------------- */
.bm-wd__statement {
  background: var(--bm-bg-soft); border: 1px solid var(--bm-border);
  border-radius: 10px; padding: 1rem 1.15rem; margin: 1rem 0;
}
.bm-wd__statement pre {
  white-space: pre-wrap; word-break: break-word; margin: 0;
  font-family: inherit; font-size: .95rem;
}
.bm-wd__alert { border-radius: 10px; padding: .9rem 1.1rem; margin-bottom: 1.25rem; border: 1px solid transparent; }
.bm-wd__alert ul { margin: 0; padding-left: 1.1rem; }
.bm-wd__alert--error { background: #fef3f2; border-color: #fda29b; color: #912018; }
.bm-wd__alert--success { background: #ecfdf3; border-color: #6ce9a6; color: #05603a; }
.bm-wd__alert--info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }

/* ---- footer link -------------------------------------------------------- */
.bm-withdraw-footer { padding: .25rem 0; }
.bm-withdraw-footer__link { text-decoration: underline; }

/* ---- proof document ----------------------------------------------------- */
.bm-wd--proof .bm-wd__card { border-style: solid; }
.bm-wd__proof-shop { font-weight: 700; margin: 0 0 1rem; }
.bm-wd__proof-table { width: 100%; border-collapse: collapse; margin: .5rem 0 1.25rem; }
.bm-wd__proof-table th { text-align: left; width: 38%; padding: .45rem .5rem; vertical-align: top; color: var(--bm-muted); font-weight: 600; }
.bm-wd__proof-table td { padding: .45rem .5rem; border-bottom: 1px solid var(--bm-border); }
.bm-wd__card h2 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 560px) {
  .bm-wd__card { padding: 1.4rem 1.15rem; }
  .bm-wd__steps li { font-size: 0; padding-top: 2.2rem; }
  .bm-wd__steps li.is-active { font-size: .78rem; }
  .bm-wd__actions { flex-direction: column; align-items: stretch; }
  .bm-wd__btn { width: 100%; }
}

/* ---- print (proof) ------------------------------------------------------ */
@media print {
  .bm-wd { margin: 0; max-width: none; }
  .bm-wd__card { border: 0; box-shadow: none; padding: 0; }
  .bm-wd__no-print, .bm-wd__steps { display: none !important; }
}
