/* ==========================================================================
   ORDER STATUS — the panel a customer gets back after looking up an order.
   Loaded only by order-status.html.

   Everything here is drawn by assets/js/order-status.js from what
   order-status.php hands back. Nothing in this file is used anywhere else,
   which is why it is not in styles.css.
   ========================================================================== */

.os-result[hidden] { display: none; }

.os-result {
  margin-top: var(--s-6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Head — the number, and where it is
   -------------------------------------------------------------------------- */
.os-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding: var(--s-5);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.os-num {
  margin: 0;
  font: 500 1.35rem/1.1 var(--f-mono);
  letter-spacing: -.01em;
  color: var(--fg);
}
.os-placed {
  margin: 6px 0 0;
  color: var(--fg-3);
  font-size: .85rem;
}

.os-pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 .8rem/1.2 var(--f-body);
  white-space: nowrap;
}
.os-pill[data-kind="open"] {
  background: rgba(0, 94, 184, .18);
  border-color: rgba(0, 94, 184, .5);
  color: #8FBAF0;
}
.os-pill[data-kind="done"] {
  background: rgba(0, 132, 61, .18);
  border-color: rgba(0, 132, 61, .5);
  color: #6FD69B;
}
.os-pill[data-kind="stopped"] {
  background: rgba(242, 169, 0, .16);
  border-color: rgba(242, 169, 0, .45);
  color: #F2C05A;
}

/* --------------------------------------------------------------------------
   The plain sentence about what is happening.
   This is the thing people came for, so it is the biggest text on the panel.
   -------------------------------------------------------------------------- */
.os-note {
  margin: 0;
  padding: var(--s-5);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--fg-2);
  border-bottom: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   The trail

   Eight steps do not fit across a phone, so the row scrolls sideways rather
   than wrapping into something that no longer reads as a sequence.
   -------------------------------------------------------------------------- */
.os-trail-wrap {
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.os-trail {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0 var(--s-5);
  min-width: 620px;
}
.os-step {
  flex: 1 1 0;
  text-align: center;
  position: relative;
  padding-top: 22px;
}
/* The connecting line, drawn behind the dots. */
.os-step::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.os-step:first-child::before { display: none; }

.os-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink-700);
  border: 2px solid var(--line-hard);
}
.os-step-label {
  font: 500 .74rem/1.3 var(--f-mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--fg-4);
}

.os-step[data-state="done"]::before { background: var(--sig-safety); }
.os-step[data-state="done"] .os-dot {
  background: var(--sig-safety);
  border-color: var(--sig-safety);
}
.os-step[data-state="done"] .os-step-label { color: var(--fg-3); }

.os-step[data-state="here"]::before { background: var(--sig-safety); }
.os-step[data-state="here"] .os-dot {
  background: var(--laser);
  border-color: var(--laser);
  box-shadow: 0 0 0 5px var(--laser-glow);
}
.os-step[data-state="here"] .os-step-label {
  color: var(--fg);
  font-weight: 700;
}

/* Off the pipeline — on hold, cancelled. Nothing is "here", so the whole
   trail is dimmed rather than pretending the order is at a step. */
.os-trail[data-off="true"] .os-step::before,
.os-trail[data-off="true"] .os-dot { opacity: .45; }

/* --------------------------------------------------------------------------
   What they ordered
   -------------------------------------------------------------------------- */
.os-body { padding: var(--s-5); }

.os-sub {
  margin: 0 0 var(--s-4);
  font: 500 .72rem/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-4);
}

.os-items {
  list-style: none;
  margin: 0 0 var(--s-5);
  padding: 0;
}
.os-items li {
  padding: var(--s-3) 0;
  border-top: 1px solid var(--line-soft);
}
.os-items li:first-child { border-top: 0; padding-top: 0; }
.os-items b { display: block; font-weight: 600; }
.os-items span {
  display: block;
  margin-top: 2px;
  color: var(--fg-3);
  font-size: .88rem;
}

.os-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--s-4);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.os-fact-k {
  font: 500 .68rem/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-4);
}
.os-fact-v {
  margin-top: 6px;
  font: 500 1.05rem/1.2 var(--f-mono);
  color: var(--fg);
}

/* --------------------------------------------------------------------------
   Where it has been
   -------------------------------------------------------------------------- */
.os-history {
  list-style: none;
  margin: 0;
  padding: var(--s-5);
  border-top: 1px solid var(--line);
}
.os-history li {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 7px 0;
  font-size: .88rem;
  color: var(--fg-3);
}
.os-history li strong {
  font-weight: 600;
  color: var(--fg-2);
}

.os-foot {
  padding: var(--s-4) var(--s-5) var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--fg-3);
  font-size: .85rem;
}

@media (max-width: 560px) {
  .os-num { font-size: 1.15rem; }
  .os-note { font-size: .98rem; }
}
