/* UNIPAK Order Status - mobile-first, single column, centered */
:root {
  --blue: #1d4f9c;
  --blue-dark: #163d7a;
  --red: #c8102e;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e2e6ec;
  --bg: #f3f5f8;
  --card: #ffffff;
  --ok: #1a8f4a;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.page {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

/* Brand */
.brand { text-align: center; margin-bottom: 24px; }
.brand__link { display: inline-block; }
.brand__logo { max-width: 300px; width: 100%; height: auto; }
.brand__title {
  margin: 16px 0 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.01em;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* Form */
.lookup { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid #c8cfd8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 79, 156, 0.18);
}
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.button {
  display: inline-block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}
.button:hover, .button:focus-visible { background: var(--blue-dark); }
.button--secondary {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--blue);
  margin-top: 10px;
}
.button--secondary:hover, .button--secondary:focus-visible { background: #eef3fb; }

.message { margin: 0; padding: 12px 14px; border-radius: 8px; font-size: 0.95rem; }
.message--error { background: #fdecee; color: #8a1020; border: 1px solid #f4c2c9; }
.message--info { background: #eef3fb; color: var(--blue-dark); border: 1px solid #cddcf3; }
.muted { color: var(--muted); margin: 0; }

/* Order */
.order { scroll-margin-top: 16px; }
.order__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.order__placed {
  margin: 10px 0 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.order__placed .order__label { display: inline; margin-right: 6px; font-weight: 400; }
.order__header--solo { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.order__label {
  margin: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.order__number { margin: 0; font-size: 1.5rem; font-weight: 700; color: var(--blue); }

/* Status tracker */
.status { padding: 20px 0 8px; }
.status__current { margin: 0 0 14px; font-size: 1.05rem; }
.status__note { margin: 12px 0 0; color: var(--muted); font-size: 0.95rem; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 16.66%;
  right: 16.66%;
  height: 3px;
  background: var(--line);
}
.steps__step { position: relative; text-align: center; font-size: 0.85rem; color: var(--muted); }
.steps__dot {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--line);
  position: relative;
  z-index: 1;
}
.steps__step.is-done .steps__dot, .steps__step.is-current .steps__dot { border-color: var(--blue); background: var(--blue); }
.steps__step.is-done, .steps__step.is-current { color: var(--ink); }
.steps__step.is-current .steps__name { font-weight: 700; color: var(--blue); }
.steps__step.is-done::before, .steps__step.is-current::before {
  content: "";
  position: absolute;
  top: 9px;
  right: 50%;
  left: -50%;
  height: 3px;
  background: var(--blue);
}
.steps__step:first-child::before { display: none; }
.status--shipped .steps__step.is-current .steps__dot { background: var(--ok); border-color: var(--ok); }
.status--shipped .steps__step.is-current .steps__name { color: var(--ok); }

/* Sections */
.section { padding-top: 20px; margin-top: 16px; border-top: 1px solid var(--line); }
.section--split { display: grid; gap: 20px; }
.section__title {
  margin: 0 0 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.section p { margin: 0; }
.address { font-style: normal; }

/* Shipments */
.shipments { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.shipment { background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; }
.shipment__box { margin: 0 0 6px; font-weight: 700; font-size: 0.9rem; color: var(--blue); }
.shipment__line { margin: 0 0 4px; }
.shipment__key { display: inline-block; min-width: 88px; color: var(--muted); font-size: 0.9rem; }
.shipment__tracking { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; word-break: break-all; }
.shipment .button--secondary { width: auto; padding: 9px 16px; }

/* Items */
.items { width: 100%; border-collapse: collapse; }
.items th { text-align: left; font-size: 0.8rem; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.items td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.items tr:last-child td { border-bottom: 0; }
.items__qty { width: 52px; text-align: center; font-weight: 600; }
.items__code { display: block; font-size: 0.8rem; color: var(--muted); }

@media (min-width: 600px) {
  .page { padding-top: 56px; }
  .card { padding: 28px 32px; }
  .brand__logo { max-width: 340px; }
  .section--split { grid-template-columns: 1fr 1fr; }
}

/* Actions (hold / cancel) under the order number */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions form { margin: 0; }
.button--small { width: auto; padding: 9px 16px; font-size: 0.95rem; }
.button--danger { background: var(--red); }
.button--danger:hover, .button--danger:focus-visible { background: #a40d25; }
.button--secondary.button--small { margin-top: 0; }

.badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; vertical-align: middle; }
.badge--hold { background: #fff4d6; color: #8a5a00; border: 1px solid #f3d48a; }


.message--success { background: #e9f7ee; color: #14532d; border: 1px solid #b7e4c7; }
.message--flash { margin: 0 0 20px; }

/* Cancel confirmation */
.confirm { margin-top: 14px; padding: 16px; border: 1px solid #f4c2c9; background: #fdecee; border-radius: 8px; }
.confirm__title { margin: 0 0 6px; font-weight: 700; color: #8a1020; }
.confirm__text { margin: 0 0 14px; color: var(--ink); }
.confirm__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.confirm__buttons form { margin: 0; flex: 1 1 200px; }
.confirm__buttons .button { width: 100%; margin-top: 0; flex: 1 1 200px; }

/* Section heading with a button on the right */
.section__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.section__head .section__title { margin: 0; }
.section__head form { margin: 0; }

/* Edit address form */
.address-form { display: grid; gap: 14px; margin-top: 4px; }
.address-form__row { display: grid; grid-template-columns: 1fr; gap: 14px; }
.address-form__errors { margin: 0; padding-left: 32px; }
.address-form__errors li { margin: 2px 0; }
.field select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1px solid #c8cfd8; border-radius: 8px; background: #fff; color: var(--ink);
}
.field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 79, 156, 0.18); }

.reset { text-align: center; margin-top: 4px; }
.link-button { background: none; border: 0; padding: 8px; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }

@media (min-width: 600px) {
  .address-form__row { grid-template-columns: 1fr 96px 130px; }
}
