/* free-pickup booking wizard — vanilla CSS, green recycling theme, phone-first.
   CSP style-src 'self': no inline styles anywhere; JS toggles classes only. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #f2f7f2; color: #22331f;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  font-size: 16px; line-height: 1.5;
}

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, #14532d, #1e7a3c 60%, #2f9e57); color: #fff; }
.hero-in { max-width: 980px; margin: 0 auto; padding: 26px 16px 30px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .3px; opacity: .95; }
.brand .leaf { width: 22px; height: 22px; fill: #a7f3c0; }
.brand .dot { color: #a7f3c0; }
.hero h1 { margin: 14px 0 6px; font-size: 30px; line-height: 1.15; }
.hero .sub { margin: 0 0 14px; font-size: 16px; max-width: 60ch; color: #e7f5ea; }
.trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; font-size: 14px; color: #d9efe0; }
.trust b { color: #a7f3c0; margin-right: 6px; }

/* ---------- layout ---------- */
.wrap { max-width: 980px; margin: -14px auto 30px; padding: 0 16px; }
.cols { display: flex; gap: 18px; align-items: flex-start; }
.panel {
  flex: 1; background: #fff; border: 1px solid #dfe8dc; border-radius: 14px;
  padding: 22px 20px; box-shadow: 0 10px 30px rgba(20, 60, 30, .08);
  min-width: 0;
}
.summary {
  width: 280px; flex-shrink: 0; background: #fff; border: 1px solid #dfe8dc;
  border-radius: 14px; padding: 16px 18px; position: sticky; top: 14px;
}
.summary h3 { margin: 0 0 10px; font-size: 15px; color: #1e7a3c; }
.summary dl { margin: 0; font-size: 14px; }
.summary dt { font-weight: 700; margin-top: 10px; color: #4a5c46; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.summary dd { margin: 2px 0 0; }

/* ---------- progress rail ---------- */
.rail { list-style: none; display: flex; gap: 6px; margin: 0 0 14px; padding: 0; }
.rail li {
  flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: #7a8a76;
  background: #e8f0e6; border-radius: 10px; padding: 8px 4px;
}
.rail li span {
  display: inline-block; width: 20px; height: 20px; line-height: 20px; border-radius: 50%;
  background: #cfe0cb; color: #33502e; margin-right: 6px; font-size: 12px;
}
.rail li.on { background: #1e7a3c; color: #fff; }
.rail li.on span { background: #a7f3c0; color: #14532d; }
.rail li.done { background: #d7ecd9; color: #2c5e34; }

/* ---------- steps ---------- */
.step h2 { margin: 0 0 4px; font-size: 22px; }
.step h3 { margin: 22px 0 8px; font-size: 16px; }
.step h3 small { font-weight: 400; color: #6c7d68; }
.hint { color: #6c7d68; font-size: 14px; margin: 4px 0 14px; }
.hidden { display: none !important; }

/* service cards */
.svc-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.svc {
  border: 2px solid #dfe8dc; border-radius: 12px; padding: 16px; cursor: pointer;
  background: #fbfdfa; text-align: left; font: inherit; color: inherit;
}
.svc:hover { border-color: #9dc7a3; }
.svc.sel { border-color: #1e7a3c; background: #eef8ef; box-shadow: 0 0 0 3px rgba(30,122,60,.12); }
.svc .ico { width: 40px; height: 40px; fill: #1e7a3c; display: block; margin-bottom: 8px; }
.svc b { display: block; font-size: 17px; margin-bottom: 4px; }
.svc p { margin: 0; font-size: 13.5px; color: #5d6f59; }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 8px; }
.cal-head strong { font-size: 17px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { text-align: center; font-size: 11.5px; font-weight: 700; color: #7a8a76; padding: 4px 0; text-transform: uppercase; }
.day {
  min-height: 44px; border: 1px solid #e3ece1; border-radius: 9px; background: #fff;
  font: inherit; font-size: 14px; cursor: pointer; position: relative; padding: 4px;
}
.day:hover { border-color: #9dc7a3; }
.day .n { font-weight: 600; }
.day .rem { display: block; font-size: 10.5px; color: #1e7a3c; }
.day.off { color: #b9c4b5; background: #f4f6f3; cursor: default; border-color: #edf1eb; }
.day.off .rem { color: #b9c4b5; }
.day.full .rem { color: #b45309; }
.day.sel { background: #1e7a3c; border-color: #1e7a3c; color: #fff; }
.day.sel .rem { color: #a7f3c0; }
.day.blank { border: none; background: transparent; }

/* windows */
.wins { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.win {
  border: 2px solid #dfe8dc; border-radius: 10px; background: #fff; padding: 10px 14px;
  cursor: pointer; font: inherit; min-width: 150px; text-align: left;
}
.win b { display: block; font-size: 15.5px; }
.win small { color: #1e7a3c; font-weight: 600; }
.win:hover { border-color: #9dc7a3; }
.win.sel { border-color: #1e7a3c; background: #eef8ef; box-shadow: 0 0 0 3px rgba(30,122,60,.12); }
.win.gone { opacity: .55; cursor: default; }
.win.gone small { color: #b45309; }

/* form */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
label { display: block; font-size: 13.5px; font-weight: 600; color: #40513c; }
label.wide { margin-top: 14px; }
input, textarea {
  display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font: inherit; font-size: 16px;
  border: 1.5px solid #cfdcc9; border-radius: 9px; background: #fff; color: #22331f;
}
input:focus, textarea:focus { outline: none; border-color: #1e7a3c; box-shadow: 0 0 0 3px rgba(30,122,60,.13); }
input.bad { border-color: #c2410c; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
textarea { resize: vertical; }

/* photos */
.drop {
  border: 2px dashed #b9d3b6; border-radius: 12px; padding: 22px 14px; text-align: center;
  color: #5d6f59; background: #fbfdfa; cursor: pointer; margin-top: 6px;
}
.drop:hover, .drop.hot { border-color: #1e7a3c; background: #eef8ef; }
.drop b { color: #1e7a3c; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumb { position: relative; width: 92px; }
.thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid #dfe8dc; display: block; }
.thumb .x {
  position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%;
  border: none; background: #b91c1c; color: #fff; font-size: 13px; cursor: pointer; line-height: 1;
}
.thumb .st { font-size: 11px; color: #6c7d68; text-align: center; display: block; margin-top: 3px; }
/* audit59 W33: retry control on a failed upload thumb */
.thumb .rt { margin-top: 4px; width: 100%; font-size: 11.5px; padding: 3px 6px; border: 1px solid #b91c1c; color: #b91c1c; background: #fff; border-radius: 7px; cursor: pointer; }
.thumb .rt:hover { background: #fee2e2; }

/* review + consents */
.review { background: #f7fbf6; border: 1px solid #dfe8dc; border-radius: 12px; padding: 14px 16px; margin-top: 10px; font-size: 15px; }
.review b { color: #1e7a3c; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14.5px; margin-top: 12px; color: #33422f; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; }
.chal { width: 90px; display: inline-block; }
#chalWrap { margin-top: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* buttons + nav */
.nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; }
.btn {
  font: inherit; font-size: 15.5px; font-weight: 700; border-radius: 10px; padding: 12px 18px;
  cursor: pointer; border: 1.5px solid transparent; text-decoration: none; display: inline-block;
}
.btn.primary { background: #1e7a3c; color: #fff; }
.btn.primary:hover { background: #17632f; }
.btn.primary:disabled { background: #b6c9b2; cursor: default; }
.btn.ghost { background: #fff; border-color: #cfdcc9; color: #33502e; }
.btn.ghost:hover { border-color: #1e7a3c; }
.btn.big { padding: 14px 26px; font-size: 17px; }
.err { color: #b91c1c; font-size: 14.5px; margin: 10px 0 0; }

/* success */
.done { text-align: center; padding: 18px 6px; }
.done .check { width: 74px; height: 74px; }
.done .check circle { fill: #e2f4e4; stroke: #1e7a3c; stroke-width: 1.6; }
.done .check path { fill: none; stroke: #1e7a3c; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done h2 { font-size: 26px; margin: 10px 0 6px; }
.done-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0 10px; }

/* manage page */
.mg { max-width: 640px; margin: 30px auto; padding: 0 16px; }
.mg .panel { padding: 24px 22px; }
.mg h1 { font-size: 24px; margin: 0 0 4px; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge.confirmed { background: #dcf3df; color: #14532d; }
.badge.cancelled { background: #fee2e2; color: #991b1b; }
.badge.completed { background: #e0e7ff; color: #3730a3; }
.badge.no_show { background: #fef3c7; color: #92400e; }
.badge.pending { background: #fef3c7; color: #92400e; }
.mg-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mg-photos img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid #dfe8dc; }

.foot { text-align: center; color: #6c7d68; font-size: 13.5px; padding: 10px 16px 26px; }
.foot a { color: #1e7a3c; }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .cols { flex-direction: column; }
  .summary { width: 100%; position: static; order: 2; }
  .panel { order: 1; }
  .hero h1 { font-size: 24px; }
  .svc-cards { grid-template-columns: 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .rail li { font-size: 11.5px; padding: 7px 2px; }
  .rail li span { margin-right: 4px; }
}

/* ---------- inline confirm modal (audit59 X23 — 4.7 F8 idiom) ---------- */
.mgmodal { position: fixed; inset: 0; background: rgba(15,30,15,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 30; }
.mgmodal.hidden { display: none; }
.mgmodal-card { background: #fff; border-radius: 14px; padding: 20px 22px; max-width: 460px; width: 100%; }
.mgmodal-card h3 { margin: 0 0 10px; }
.mgmrow { display: flex; gap: 8px; margin-top: 16px; }
.mgmrow .btn { flex: 1 1 auto; }
.btn.danger { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.btn.danger:hover { background: #941515; }
