/* =============================================================
   DOODLY — Live Order Status Banner (DOODLY_LIVEORDER)
   Premium, token-themed, responsive. Lightweight animations only;
   fully disabled under prefers-reduced-motion.
   ============================================================= */
.lo-host { display: block; }
.lo-host:empty { display: none; }

/* public home: sits at the very top of #main, below the sticky nav */
#main > .lo-host.lo-host-on { max-width: 1200px; margin: 14px auto 0; padding: 0 clamp(16px, 4vw, 40px); }
/* dashboard: top of .content */
.content > .lo-host.lo-host-on { margin: 0 0 18px; }

.lo-banner {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r, 18px);
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--mint-soft, #E4F6EC) 70%, transparent), transparent 55%),
    var(--surface, #fff);
  box-shadow: var(--shadow-sm, 0 6px 24px rgba(15, 61, 46, .08));
}
.lo-banner.tone-amber { border-color: color-mix(in srgb, var(--gold, #E8B864) 55%, var(--line)); }
.lo-banner.tone-red { border-color: color-mix(in srgb, var(--danger, #c0392b) 35%, var(--line)); }
.lo-banner::before {                         /* slim accent rail */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--leaf, #1FAE66), var(--leaf-600, #169A57));
}
.lo-banner.tone-amber::before { background: linear-gradient(var(--gold, #E8B864), #d39b3f); }
.lo-banner.tone-red::before { background: linear-gradient(#e15b4c, var(--danger, #c0392b)); }
.lo-banner.tone-grey::before { background: var(--ink-3, #9aa4a0); }

/* sliding appearance */
.lo-banner.reveal-lo { animation: lo-slide .5s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes lo-slide { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- head ---------- */
.lo-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; }
.lo-ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--leaf, #1FAE66), var(--leaf-600, #169A57));
}
.lo-ic.tone-amber { background: linear-gradient(135deg, var(--gold, #E8B864), #d39b3f); }
.lo-ic.tone-blue { background: linear-gradient(135deg, #2f8fe0, #1f6fc0); }
.lo-ic.tone-red { background: linear-gradient(135deg, #e15b4c, var(--danger, #c0392b)); }
.lo-ic.tone-grey { background: var(--ink-3, #9aa4a0); }
.lo-ic.tone-blue, .lo-ic.tone-green { animation: lo-pulse-ic 2.4s ease-in-out infinite; }
@keyframes lo-pulse-ic { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--leaf, #1FAE66) 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }

.lo-headtxt { flex: 1; min-width: 0; }
.lo-title { font-weight: 700; font-size: 15px; color: var(--ink, #122); line-height: 1.25; }
.lo-sub { font-size: 12.5px; color: var(--ink-2, #5a6b63); margin-top: 1px; }

.lo-eta {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  font-weight: 700; font-size: 13px; color: var(--forest, #0F3D2E);
  background: var(--mint-soft, #E4F6EC); border-radius: 999px; padding: 5px 11px;
}
.lo-eta.count { color: #b03a2e; background: color-mix(in srgb, #e15b4c 16%, transparent); }
.lo-statusbadge { flex: 0 0 auto; }
.lo-collapse, .lo-dismiss {
  flex: 0 0 auto; width: 30px; height: 30px; border: none; background: transparent;
  color: var(--ink-3, #8a958f); border-radius: 8px; cursor: pointer; display: grid; place-items: center;
  transition: background .15s, color .15s, transform .2s;
}
.lo-collapse:hover, .lo-dismiss:hover { background: var(--mint-soft, #E4F6EC); color: var(--forest, #0F3D2E); }
.is-collapsed .lo-collapse svg { transform: rotate(-90deg); }

@media (max-width: 640px) {
  .lo-statusbadge { display: none; }
  .lo-title { font-size: 14px; }
  .lo-head { flex-wrap: wrap; gap: 9px; padding: 13px 12px 12px 16px; }
  .lo-ic { width: 36px; height: 36px; }
  .lo-eta { order: 5; flex-basis: 100%; justify-content: flex-start; }   /* ETA drops below so the title gets full width */
}

/* ---------- body ---------- */
.lo-body { padding: 4px 16px 16px 20px; animation: lo-fade .3s ease both; }
@keyframes lo-fade { from { opacity: 0; } to { opacity: 1; } }

/* timeline */
.lo-timeline { position: relative; margin: 10px 0 18px; padding-top: 6px; }
.lo-track { position: relative; height: 4px; border-radius: 4px; background: var(--line, #e6ece9); margin: 0 6px 10px; }
.lo-track-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, var(--leaf, #1FAE66), var(--leaf-600, #169A57)); transition: width .7s cubic-bezier(.22, 1, .36, 1); }
.lo-van {
  position: absolute; top: -12px; transform: translateX(-50%); color: var(--forest, #0F3D2E);
  background: #fff; border: 1.5px solid var(--leaf, #1FAE66); border-radius: 9px; padding: 3px;
  display: grid; place-items: center; transition: left .7s cubic-bezier(.22, 1, .36, 1);
  animation: lo-vanbob 1.1s ease-in-out infinite; box-shadow: 0 3px 10px rgba(15, 61, 46, .18);
}
@keyframes lo-vanbob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-2px); } }

.lo-steps { display: flex; justify-content: space-between; gap: 4px; }
.lo-step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; text-align: center; }
.lo-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface, #fff); border: 2px solid var(--line, #e0e6e3);
  color: var(--ink-3, #9aa4a0); font-size: 11.5px; font-weight: 700; position: relative; transition: all .3s;
}
.lo-step.done .lo-dot { background: var(--leaf, #1FAE66); border-color: var(--leaf, #1FAE66); color: #fff; }
.lo-step.on .lo-dot { border-color: var(--leaf, #1FAE66); color: var(--leaf-600, #169A57); }
.lo-pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--leaf, #1FAE66); animation: lo-pulse-dot 1.4s ease-in-out infinite; }
@keyframes lo-pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--leaf, #1FAE66) 55%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.lo-step-label { font-size: 10.5px; font-weight: 600; color: var(--ink-3, #8a958f); line-height: 1.2; }
.lo-step.done .lo-step-label, .lo-step.on .lo-step-label { color: var(--forest, #0F3D2E); }
@media (max-width: 560px) {
  .lo-step-label { display: none; }
  .lo-step.on .lo-step-label { display: block; font-size: 10px; }
}

/* delivered burst */
.lo-burst { animation: lo-burst .6s cubic-bezier(.22, 1.4, .4, 1) both; }
@keyframes lo-burst { 0% { transform: scale(.5) rotate(-12deg); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* subscription card */
.lo-subcard { margin: 4px 0 12px; border: 1px dashed color-mix(in srgb, var(--leaf, #1FAE66) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--mint-soft, #E4F6EC) 45%, transparent); padding: 11px 14px; }
.lo-subcard-h { font-weight: 700; font-size: 12.5px; color: var(--forest, #0F3D2E); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.lo-subcard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px 16px; }
.lo-subcard-grid > div { display: flex; flex-direction: column; }
.lo-subcard-grid span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3, #8a958f); }
.lo-subcard-grid b { font-size: 13px; color: var(--ink, #122); }

/* dashboard details strip */
.lo-dashgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin: 4px 0 12px; }
.lo-dashcell { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.lo-dashcell span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-3, #8a958f); }
.lo-dashcell b { font-size: 13px; color: var(--forest, #0F3D2E); }

/* actions */
.lo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lo-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-decoration: none;
  font-size: 12.5px; font-weight: 600; padding: 8px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface, #fff); color: var(--ink, #122);
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.lo-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm, 0 4px 14px rgba(15, 61, 46, .1)); border-color: color-mix(in srgb, var(--leaf, #1FAE66) 40%, var(--line)); }
.lo-btn-primary { background: linear-gradient(135deg, var(--leaf, #1FAE66), var(--leaf-600, #169A57)); border-color: transparent; color: #fff; }
.lo-btn-quiet { color: var(--ink-2, #5a6b63); }
.lo-btn-quiet:hover { color: var(--forest, #0F3D2E); }

/* admin/demo simulate row */
.lo-sim { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.lo-sim > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3, #8a958f); }
.lo-simbtn { font-size: 12px; font-weight: 600; cursor: pointer; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface, #fff); color: var(--forest, #0F3D2E); }
.lo-simbtn:hover { background: var(--mint-soft, #E4F6EC); }
.lo-sim small { font-size: 11px; color: var(--ink-3, #9aa4a0); margin-left: auto; }
@media (max-width: 640px) { .lo-sim small { display: none; } }

/* dark theme nudge */
[data-theme="dark"] .lo-banner { background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--leaf, #1FAE66) 14%, transparent), transparent 55%), var(--surface); }
[data-theme="dark"] .lo-van { background: var(--surface); }

/* ---------- hero states (welcome / subscription / checkout) ---------- */
.lo-hero { display: flex; align-items: center; gap: clamp(16px, 3vw, 32px); padding: clamp(20px, 3vw, 30px); flex-wrap: wrap; }
.lo-hero-art { position: relative; width: 96px; height: 96px; flex-shrink: 0; display: grid; place-items: center; border-radius: 22px;
  background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--leaf, #1FAE66) 22%, transparent), transparent 60%), var(--surface-2, #f3faf5);
  overflow: hidden; }
.lo-hero-bottle { color: var(--leaf-600, #178a52); animation: loFloat 3.6s ease-in-out infinite; }
@keyframes loFloat { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-7px) rotate(3deg); } }
.lo-milkdrop { position: absolute; width: 8px; height: 8px; border-radius: 50% 50% 50% 0; background: color-mix(in srgb, var(--leaf, #1FAE66) 55%, #fff); transform: rotate(45deg); opacity: 0; }
.lo-milkdrop.d1 { left: 22px; top: -6px; animation: loDrop 2.8s ease-in 0s infinite; }
.lo-milkdrop.d2 { left: 48px; top: -6px; animation: loDrop 2.8s ease-in .9s infinite; }
.lo-milkdrop.d3 { left: 68px; top: -6px; animation: loDrop 2.8s ease-in 1.7s infinite; }
@keyframes loDrop { 0% { transform: translateY(0) rotate(45deg); opacity: 0; } 15% { opacity: .9; } 80% { opacity: .5; } 100% { transform: translateY(96px) rotate(45deg); opacity: 0; } }
.lo-hero-body { flex: 1; min-width: 240px; }
.lo-hero-eyebrow { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--leaf-600, #178a52); margin-bottom: 6px; }
.lo-hero-title { font-family: 'Fraunces', serif; color: var(--forest, #0F3D2E); font-size: clamp(1.2rem, 2.4vw, 1.6rem); line-height: 1.2; margin: 0 0 6px; }
.lo-hero-sub { color: var(--ink-2, #33403b); font-size: .92rem; margin: 0 0 14px; max-width: 60ch; }
.lo-hero .lo-actions { margin-top: 0; }
.lo-btn-lg { padding: .7rem 1.2rem; font-size: .95rem; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .lo-banner.reveal-lo, .lo-ic, .lo-van, .lo-pulse, .lo-burst, .lo-body, .lo-hero-bottle, .lo-milkdrop { animation: none !important; }
  .lo-milkdrop { display: none; }
  .lo-track-fill, .lo-van, .lo-btn { transition: none !important; }
}
