/* ═══════════════════════════════════════════════════════════════════
   E Care Medical Supplies — Shared component · /assets/css/ecare-item-number.css
   BUILD v2026.10.02-b009
   The "ITEM #8" pill on product photos, its tip, and the
   "Order by number — like a menu" banner. Everything is scoped to
   .ec-itemnum* / .ec-obn* so it can't change anything else on a page,
   and the old .ecare-cat-pill rules can't change it.
   ═══════════════════════════════════════════════════════════════════ */

/* The pill: bottom-right of the photo (b002 — was bottom-left). */
.ec-itemnum-wrap {
  position: absolute; right: 10px; bottom: 10px; z-index: 5;
  font-family: inherit; line-height: 1;
}
.ec-itemnum {
  box-sizing: border-box;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; margin: 0; padding: 6px 14px 6px 7px;
  border: 3px solid #fff; border-radius: 999px;
  background: #0b3a6a; color: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .28);
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.ec-itemnum:hover { background: #082e55; }
.ec-itemnum:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.ec-itemnum__icon, .ec-obn__pill .ec-itemnum__icon {
  width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%;
  background: #fff; color: #0b3a6a;
  display: inline-flex; align-items: center; justify-content: center;
}
.ec-itemnum__txt { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; }
.ec-itemnum__lbl { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.1; }
.ec-itemnum__n   { font-size: 22px; font-weight: 800; line-height: 1; }

/* The tip: above the pill. Your navy, not black — easy on older eyes. */
.ec-itemnum__tip {
  position: absolute; right: 0; bottom: calc(100% + 10px);   /* opens from the right edge, over the photo */
  width: max-content; max-width: min(270px, 78vw); box-sizing: border-box;   /* padding counts inside the width */
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px; border-radius: 12px;
  background: #082e55; color: #fff;
  font-size: 15.5px; line-height: 1.4; font-weight: 500;
  box-shadow: 0 8px 22px rgba(8, 46, 85, .35);
  visibility: hidden; opacity: 0; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  pointer-events: none;
}
.ec-itemnum__tip::after {   /* the little arrow down to the pill */
  content: ""; position: absolute; right: 26px; top: 100%;
  border: 8px solid transparent; border-top-color: #082e55;
}
.ec-itemnum__call {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px;
  padding: 0 14px; border-radius: 999px; align-self: flex-end;
  background: #fff; color: #0b3a6a !important; font-weight: 800; font-size: 16px;
  text-decoration: none !important;
}
.ec-itemnum__call:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.ec-itemnum__ask { font-size: 15.5px; text-align: right; }

/* Open: tapped (phones), keyboard focus, or hover with a mouse.
   (keyboard focus only — a tapped button can keep focus on some phones, which
   would stop a second tap from closing the tip) */
.ec-itemnum-wrap.is-open .ec-itemnum__tip,
.ec-itemnum:focus-visible + .ec-itemnum__tip,
.ec-itemnum__tip:focus-within {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
}
@media (hover: hover) and (pointer: fine) {
  .ec-itemnum-wrap:hover .ec-itemnum__tip { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
}
/* b003: when another badge on the photo would sit under the pill (HSA/FSA, a deal badge…),
   the script moves the pill to the bottom-left corner instead, its tip opening from the left. */
.ec-itemnum-wrap.is-left { right: auto; left: 10px; }
.ec-itemnum-wrap.is-left .ec-itemnum__tip { right: auto; left: 0; }
.ec-itemnum-wrap.is-left .ec-itemnum__tip::after { right: auto; left: 26px; }
.ec-itemnum-wrap.is-left .ec-itemnum__call { align-self: flex-start; }
.ec-itemnum-wrap.is-left .ec-itemnum__ask { text-align: left; }

/* b004: the version for tiles that are one big link — same look, the pill is a span */
.ec-itemnum-wrap--inlink .ec-itemnum { cursor: pointer; user-select: none; }
.ec-itemnum-wrap--inlink .ec-itemnum__call { cursor: pointer; }
.ec-vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Escape closes the tip and keeps it closed while the pill still has focus */
.ec-itemnum-wrap.is-hushed .ec-itemnum__tip { visibility: hidden; opacity: 0; pointer-events: none; }

@media (max-width: 480px) {
  .ec-itemnum { min-height: 46px; padding: 5px 12px 5px 6px; gap: 7px; }
  .ec-itemnum__icon { width: 27px; height: 27px; }
  .ec-itemnum__n { font-size: 20px; }
}

/* The banner: once above the cards. */
.ec-obn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  margin: 14px 8px 18px; padding: 16px 20px; border-radius: 16px;
  background: #0b3a6a; color: #fff; font-family: inherit;
}
.ec-obn__pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 7px; border-radius: 999px; background: #fff; color: #0b3a6a;
}
.ec-obn__pill .ec-itemnum__icon { background: #0b3a6a; color: #fff; }
.ec-obn__text { flex: 999 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ec-obn__text strong { font-size: 20px; font-weight: 800; line-height: 1.2; }
.ec-obn__text span { font-size: 16px; line-height: 1.45; color: #dbe6f3; }
.ec-obn__call {
  flex: 1 1 190px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  background: #fff; color: #0b3a6a !important; font-weight: 800; font-size: 17px;
  text-decoration: none !important; white-space: nowrap;
}
.ec-obn__call:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

/* b006: the banner's example — "for example" under a sample tag, or a photo outline with the tag in its corner */
.ec-obn__sample { flex-shrink: 0; display: inline-flex; flex-direction: column; align-items: center; gap: 5px; }
.ec-obn__eg { font-size: 12.5px; font-weight: 600; color: #dbe6f3; }
.ec-obn__where {
  position: relative; flex-shrink: 0; width: 104px; height: 78px; margin: 0 12px 12px 0;
  border-radius: 10px; background: #dbe6f3; border: 2px solid #fff; color: #8aa3c0;
  display: inline-flex; align-items: center; justify-content: center;
}
.ec-obn__tag {
  position: absolute; right: -12px; bottom: -12px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 4px; border-radius: 999px; background: #0b3a6a; color: #fff;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.ec-obn__tag .ec-itemnum__icon { width: 18px; height: 18px; }
@media (max-width: 480px) { .ec-obn__where { width: 84px; height: 62px; } }

/* b009: the banner's call button matches the hero's number button — gold while the store is open, orange for the
   after-hours line — and sweeps once when the banner comes into view (jECare-ItemNumber.js), then stays still. */
.ec-obn__call {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #ffc933, #f5b301); color: #0b3a6a !important;
  border: 1px solid rgba(255, 255, 255, .45); box-shadow: 0 2px 8px rgba(245, 179, 1, .35);
  transition: transform .18s, box-shadow .18s, background .18s;
}
.ec-obn__call:hover { background: linear-gradient(180deg, #ffd76a, #ffc933); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245, 179, 1, .5); }
.ec-obn__call--after { background: linear-gradient(180deg, #f97316, #ea580c); color: #fff !important; box-shadow: 0 2px 8px rgba(234, 88, 12, .45);
  flex: 0 1 auto; min-width: max-content; padding: 0 18px; gap: 7px; }   /* sized to "After hours" + the number, never clipped */
@media (max-width: 560px) { .ec-obn__call--after { flex: 1 1 100%; min-width: 0; } }
.ec-obn__call--after:hover { background: linear-gradient(180deg, #fb923c, #f97316); box-shadow: 0 4px 12px rgba(234, 88, 12, .6); }
.ec-obn__call > * { position: relative; z-index: 1; }
.ec-obn__call::before {
  content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
}
.ec-obn__call.is-swept::before { animation: ec-obn-sweep 1.2s ease-out 1 forwards; }
@keyframes ec-obn-sweep { from { left: -75%; } to { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  .ec-itemnum__tip { transition: none; transform: none; }
  .ec-obn__call::before { display: none; }
  .ec-obn__call, .ec-obn__call:hover { transition: none; transform: none; }
}
@media print {   /* a printed page keeps the number, not the tip or the banner's button */
  .ec-itemnum__tip, .ec-obn__call { display: none !important; }
  .ec-itemnum { box-shadow: none; }
}
/* ═══ END · ecare-item-number.css · BUILD v2026.10.02-b009 ═══ */