/* CAR BATTERY OKC — My bookings (/my-bookings/, js/my.js): sign in by email, the customer's jobs as comic panels, each job's
   receipt (the booking form's work-order receipt, in a pop-up), and the warranty claim form. Builds on /css/styles.css
   (tokens, .btn, .field, .slot, .receipt, .pay__el / .pay__err) and /css/area.css (.ap-hero). */
.mb { padding-block: clamp(1.8rem, 5vw, 3.2rem) clamp(3rem, 8vw, 5rem); background: var(--ink); }
.mb__wrap { display: grid; justify-items: stretch; }        /* lined up with the heading above (same container) */
.mb-claim { max-width: 780px; }
.mb-done { max-width: 640px; }
.mb-wait { display: inline-flex; align-items: center; gap: .7rem; font-weight: 800; color: var(--paper-2); }

.mb-card, .mb-claim { padding: clamp(1.25rem, 4.5vw, 2.2rem); background: var(--surface); border: var(--bd) solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.mb-h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 6vw, 2.8rem); line-height: .95; letter-spacing: .02em;
  text-transform: uppercase; color: var(--paper); }
.mb-h2 em { font-style: normal; color: var(--amber); }
.mb-p { margin-top: .7rem; font-size: 1.05rem; font-weight: 700; line-height: 1.55; color: var(--paper-2); }
.mb-p a, .mb-small a, .mb-agree a { color: var(--amber); font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
.mb-small { font-size: .88rem; font-weight: 700; line-height: 1.45; color: var(--muted); }

/* ---------- signed out ---------- */
.mb-signin { max-width: 560px; }
.mb-signin form, .mb-sent { display: grid; gap: 1rem; }
.mb-signin .field input { font-size: 1.1rem; }
.mb-sent .btn--link { justify-self: start; padding-left: 0; }
.mb-why { display: grid; gap: .55rem; margin-top: 1.6rem; padding-top: 1.2rem; border-top: 2px dashed var(--line); }
.mb-why li { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--paper-2); }
.mb-why .ico { width: 22px; height: 22px; color: var(--amber); }

/* ---------- signed in ---------- */
.mb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; padding: .7rem .9rem .7rem 1.1rem;
  background: var(--line-2); color: #fff; border-radius: var(--radius-lg); font-weight: 700; }
.mb-bar b { color: var(--yellow); overflow-wrap: anywhere; }
.mb-bar .btn { box-shadow: 3px 3px 0 var(--yellow); }
.mb-group { display: flex; align-items: center; gap: .6rem; margin: 2rem 0 1rem; font-family: var(--font-display); font-weight: 400;
  font-size: 1.7rem; letter-spacing: .04em; text-transform: uppercase; }
.mb-group span { min-width: 1.9rem; padding: .05rem .5rem; border: 2px solid var(--line-2); border-radius: 999px; background: var(--yellow);
  font-size: 1.05rem; text-align: center; }
.mb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1.2rem; align-items: start; }
.mb-empty { margin-top: 1.4rem; display: grid; gap: .9rem; justify-items: start; }

.mb-job { display: grid; gap: .75rem; padding: 1.15rem 1.2rem 1.25rem; background: var(--surface); border: var(--bd) solid var(--line-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.mb-job--up { box-shadow: 5px 5px 0 var(--amber); }
.mb-job--off { background: #FAF7EE; }
.mb-job--claim { border-style: dashed; }
.mb-job__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; }
.mb-job__ref { font-family: var(--font-mono); font-weight: 700; font-size: .8rem; letter-spacing: .06em; color: var(--muted); }
.mb-job__ref span { white-space: nowrap; }
.mb-pill { display: inline-block; padding: .15rem .65rem; border: 2px solid var(--line-2); border-radius: 999px; font-family: var(--font-display);
  font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3; }
.mb-pill--up { background: var(--yellow); }
.mb-pill--done { background: #E3F6EA; color: #0B5A34; border-color: #0B5A34; }
.mb-pill--off { background: #EEE; color: var(--muted); border-color: var(--muted-2); }
.mb-job__when { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; line-height: 1.05; letter-spacing: .02em; text-transform: uppercase; }
.mb-job__dl { display: grid; gap: .5rem; }
.mb-job__dl > div { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: .6rem; }
.mb-job__dl dt { padding-top: .12rem; font-family: var(--font-mono); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.mb-job__dl dd { margin: 0; font-weight: 800; line-height: 1.4; color: var(--paper-2); overflow-wrap: anywhere; }
.mb-job__dl dd small { display: block; font-weight: 700; font-size: .85rem; color: var(--muted); }
.mb-result--our_fault, .mb-result--partial, .mb-result--new_battery { color: var(--volt); }
.mb-result--not_covered { color: var(--paper); }
.mb-warr { display: flex; align-items: flex-start; gap: .55rem; padding: .65rem .8rem; border: 2px solid #0B5A34; border-radius: var(--radius);
  background: #E3F6EA; color: #0B4A2B; font-weight: 800; line-height: 1.35; }
.mb-warr .ico { width: 22px; height: 22px; margin-top: .05rem; color: #0B5A34; }
.mb-warr > span { min-width: 0; }
.mb-warr small { display: block; font-weight: 700; font-size: .85rem; color: #2E6B4C; }
.mb-warr--open { border-color: var(--line-2); background: var(--surface-2); color: var(--paper-2); }
.mb-warr--open .ico { color: var(--amber); }
.mb-warr--off { border-color: var(--muted-2); background: #F1F1F1; color: var(--muted); }
.mb-warr--off .ico { color: var(--muted-2); }
.mb-claims { margin-top: -.2rem; }
.mb-job__acts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .2rem; }
.mb-job__acts .btn .ico { width: 18px; height: 18px; }

/* ---------- the warranty claim ---------- */
.mb-back { justify-self: start; padding-left: 0; margin-bottom: .4rem; }
.mb-claim { display: grid; }
.mb-claim.is-paying { pointer-events: none; }
.mb-claim.is-paying #cBtn { opacity: .75; }
.mb-steps { display: grid; gap: 1.6rem; margin-top: 1.4rem; }
.mb-step { display: grid; gap: .9rem; padding-top: 1.3rem; border-top: 2px dashed var(--line-2); }
.mb-step__h { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem;
  letter-spacing: .03em; text-transform: uppercase; }
.mb-step__h span { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 2px solid var(--line-2); border-radius: 50%;
  background: var(--amber); color: #fff; font-size: 1.15rem; box-shadow: 2px 2px 0 var(--line-2); }
.mb-photo { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.mb-photo__pick { position: relative; overflow: hidden; cursor: pointer; }
.mb-photo__pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mb-photo__shot { display: flex; align-items: center; gap: .6rem; width: 100%; }
.mb-photo__shot img { width: 120px; height: 90px; object-fit: cover; border: 2px solid var(--line-2); border-radius: var(--radius); }

.mb-where { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.mb-radio { position: relative; cursor: pointer; }
.mb-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.mb-radio span { display: grid; gap: .2rem; height: 100%; padding: .8rem .9rem; border: 2px solid var(--line-2); border-radius: var(--radius);
  background: #fff; transition: background .2s, box-shadow .2s; }
.mb-radio b { font-weight: 900; }
.mb-radio small { font-weight: 700; font-size: .85rem; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }
.mb-radio input:checked + span { background: var(--yellow); box-shadow: 3px 3px 0 var(--line-2); }
.mb-radio input:checked + span small { color: var(--paper-2); }
.mb-radio input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.mb-addr { display: grid; grid-template-columns: 2fr 1fr; gap: .7rem; }
.mb-addr__street { grid-column: 1 / -1; }
.mb-pick { margin-top: .3rem; }
.mb-days { display: flex; gap: .5rem; overflow-x: auto; padding: .1rem .1rem .55rem; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.mb-day { position: relative; flex: none; scroll-snap-align: start; cursor: pointer; }
.mb-day input { position: absolute; opacity: 0; width: 0; height: 0; }
.mb-day span { display: grid; justify-items: center; min-width: 78px; padding: .5rem .55rem .45rem; border: 2px solid var(--line-2); border-radius: var(--radius);
  background: #fff; line-height: 1.15; transition: background .2s, box-shadow .2s; }
.mb-day small { font-family: var(--font-mono); font-weight: 700; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mb-day b { font-weight: 900; font-size: 1.12rem; letter-spacing: 0; }   /* not the comic font: its 7 reads as a 1 at this size */
.mb-day i { font-style: normal; font-size: .72rem; font-weight: 800; color: var(--muted-2); }
.mb-day input:checked + span { background: var(--yellow); box-shadow: 3px 3px 0 var(--line-2); }
.mb-day input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.mb-claim .slots__grid { margin-top: 0; }
.mb-claim .slots__msg { margin-top: 0; }
.mb-hours { display: flex; align-items: center; gap: .45rem; }
.mb-hours .ico { width: 18px; height: 18px; color: var(--amber); }

.mb-bill { padding: .9rem 1rem; border: 2px dashed var(--line-2); border-radius: var(--radius); background: #fff; font-family: var(--font-mono); font-weight: 700; }
.mb-bill__total { margin-top: .3rem; padding-top: .5rem; border-top: 3px solid var(--line-2); }
.mb-bill__total dt { color: var(--paper) !important; font-size: .85rem !important; letter-spacing: .12em; }
.mb-bill__total dd { font-family: var(--font-display); font-weight: 400; font-size: 2rem; line-height: 1; color: var(--amber); text-shadow: 2px 2px 0 #111; }
.mb-how { display: grid; gap: .45rem; padding: .8rem 1rem; border-left: 6px solid var(--yellow); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .95rem; font-weight: 700; line-height: 1.45; color: var(--paper-2); }
.mb-how b { color: var(--paper); }
.mb-claim .pay__el { margin-top: 0; }
.mb-agree { display: flex; align-items: flex-start; gap: .6rem; font-size: .92rem; font-weight: 700; line-height: 1.45; color: var(--paper-2); cursor: pointer; }
.mb-agree input { width: 20px; height: 20px; flex: none; margin-top: .1rem; accent-color: var(--amber); }
.mb-claim #cBtn:disabled { opacity: .7; cursor: progress; transform: none; box-shadow: var(--shadow-sm); }
.mb-claim .pp-fine { margin-top: -.2rem; text-align: center; font-size: .85rem; font-weight: 700; line-height: 1.45; color: var(--muted); }

.mb-done { display: grid; gap: .4rem; justify-items: start; }
.mb-done .ty__cal { justify-content: flex-start; margin-top: .6rem; }
.mb-done > .btn { margin-top: 1rem; }

/* ---------- a job's receipt (pop-up) ---------- */
.mb-rcpt { width: min(100% - 1.5rem, 430px); max-height: calc(100dvh - 1.5rem); padding: 0; border: 0; background: transparent; overflow: visible; }
.mb-rcpt::backdrop { background: rgba(17, 17, 17, .62); }
.mb-rcpt[open] { display: grid; gap: .9rem; }
.mb-rcpt__x { position: absolute; top: -.6rem; right: -.6rem; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px;
  border: var(--bd) solid var(--line-2); border-radius: 50%; background: var(--yellow); box-shadow: 2px 2px 0 var(--line-2); }
.mb-rcpt__x .ico { width: 20px; height: 20px; stroke-width: 3; }
.mb-rcpt__x:hover { background: #fff; }
.mb-rcpt__paper { max-height: calc(100dvh - 7rem); overflow-y: auto; padding: 4px;
  filter: drop-shadow(3px 0 0 #111) drop-shadow(-3px 0 0 #111) drop-shadow(0 3px 0 #111) drop-shadow(0 -3px 0 #111); }
.mb-rcpt .receipt { border: 0; box-shadow: none; padding: 1.4rem 1.2rem 2.3rem; font-size: .8rem; }
.mb-rcpt__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.mb-rcpt__actions .btn .ico { width: 18px; height: 18px; }
.mb-print { display: none; }

@media (max-width: 760px) {
  .mb-where { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .mb-claim #cBtn { padding: 1rem .9rem; font-size: 1.3rem; white-space: normal; line-height: 1.1; }
  .mb-done .btn { width: 100%; font-size: 1.2rem; }
  .mb-addr { grid-template-columns: minmax(0, 1fr); }
  .mb-job__dl > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .mb-job__acts .btn { flex: 1 1 auto; }
  .mb-rcpt__actions .btn { flex: 1 1 40%; padding: .7rem .6rem; font-size: 1.15rem; }
  .mb-rcpt__actions .btn .ico { display: none; }          /* (so "Save receipt" stays on one line) */
  .mb-rcpt__paper { max-height: calc(100dvh - 6.2rem); }
}

@media print {
  body.mb-printing > :not(.mb-print) { display: none !important; }
  body.mb-printing { background: #fff !important; }
  body.mb-printing .mb-print { display: block; max-width: 420px; margin: 14mm auto 0; }
  body.mb-printing .receipt { border: 3px solid #111; box-shadow: none; break-inside: avoid; font-size: 11px;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
