/* ═══════════════════════════════════════════
   Tema v2 — Seguimiento de pedido (OrderStatus)
   Prefijo: v2os-
═══════════════════════════════════════════ */

/* Sin pedido el footer queda abajo de la pantalla */
body.theme-v2.v2os-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.v2os-page .v2-main {
  flex: 1 0 auto;
}

.v2os-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Cabecera con buscador ────────────────── */

.v2os-head-sub {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.8;
}

.v2os-search {
  position: relative;
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin-top: 18px;
}

.v2os-search-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  display: flex;
  color: var(--v2-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.v2os-search input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px 0 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--v2-ink);
  font-family: var(--v2-font);
  font-size: 15px;
  letter-spacing: 0.02em;
  outline: none;
  box-shadow: var(--v2-shadow);
  transition: border-color 0.2s ease;
}

.v2os-search input::placeholder {
  color: #a3a3aa;
  letter-spacing: 0;
}

.v2os-search input:focus {
  border-color: var(--v2-ink);
}

.v2os-search .v2-btn {
  flex-shrink: 0;
  height: 48px;
}

.v2os-last {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--v2-ink);
  font-size: 13px;
  text-decoration: none;
}

.v2os-last[hidden] {
  display: none;
}

.v2os-last strong {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.v2os-last .v2-arrow {
  width: 24px;
  height: 24px;
}

/* ── Avisos ───────────────────────────────── */

.v2os-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--v2-soft);
  font-size: 14px;
  line-height: 1.5;
}

.v2os-notice--error {
  background: #fdf0f2;
}

.v2os-notice--error strong {
  color: #c0304f;
}

.v2os-notice span {
  color: var(--v2-muted);
  font-size: 13px;
}

/* ── Layout del pedido ────────────────────── */

.v2os-body {
  margin-top: 16px;
}

.v2os-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.v2os-main,
.v2os-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.v2os-card {
  padding: 18px;
  border: 1px solid var(--v2-line);
  border-radius: 20px;
  background: #fff;
}

.v2os-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

.v2os-card-title span {
  color: var(--v2-muted);
  font-size: 12px;
  font-weight: 500;
}

.v2os-small {
  margin: 0;
  color: var(--v2-muted);
  font-size: 12px;
}

/* ── Estado ───────────────────────────────── */

.v2os-status-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.v2os-code {
  margin: 2px 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.v2os-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--v2-soft);
  color: var(--v2-ink);
  font-size: 12px;
  font-weight: 700;
}

.v2os-pill--confirmado,
.v2os-pill--enviado {
  background: color-mix(in srgb, var(--v2-accent) 16%, #ffffff);
}

.v2os-pill--entregado {
  background: #ecf8f1;
  color: #1d7a4a;
}

.v2os-pill--cancelado {
  background: #fdf0f2;
  color: #c0304f;
}

/* Pasos: puntos unidos por una línea */
.v2os-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.v2os-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* Línea hacia el paso anterior */
.v2os-step + .v2os-step::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--v2-line);
}

.v2os-step.is-done + .v2os-step::before,
.v2os-step.is-done + .v2os-step.is-current::before {
  background: var(--v2-ink);
}

.v2os-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--v2-line);
  border-radius: 50%;
  background: #fff;
  color: #fff;
}

.v2os-step.is-done .v2os-dot {
  border-color: var(--v2-ink);
  background: var(--v2-ink);
}

.v2os-step.is-current .v2os-dot {
  border-color: var(--v2-accent);
  background: var(--v2-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--v2-accent) 22%, #ffffff);
}

.v2os-step-label {
  color: var(--v2-muted);
  font-size: 11px;
  font-weight: 500;
}

.v2os-step.is-done .v2os-step-label,
.v2os-step.is-current .v2os-step-label {
  color: var(--v2-ink);
  font-weight: 600;
}

.v2os-status-msg {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--v2-soft);
  color: var(--v2-ink);
  font-size: 13px;
  line-height: 1.5;
}

.v2os-status.is-cancelled .v2os-status-msg {
  background: #fdf0f2;
  color: #a12a43;
}

/* Puntos del pedido */
.v2os-points {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 12px 12px 14px;
  border: 1px dashed color-mix(in srgb, var(--v2-accent) 55%, #ffffff);
  border-radius: 14px;
  background: color-mix(in srgb, var(--v2-accent) 8%, #ffffff);
  color: var(--v2-ink);
  text-decoration: none;
}

.v2os-points > span:first-child {
  display: flex;
  flex-direction: column;
}

.v2os-points strong {
  font-size: 13px;
  font-weight: 600;
}

.v2os-points small {
  color: var(--v2-muted);
  font-size: 12px;
}

.v2os-points-done {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  color: #1d7a4a;
  font-size: 12px;
  font-weight: 600;
}

/* ── Productos ────────────────────────────── */

.v2os-items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.v2os-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.v2os-item + .v2os-item {
  border-top: 1px solid var(--v2-line);
}

.v2os-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  padding: 4px;
  border-radius: 12px;
  background: var(--v2-soft);
}

.v2os-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.v2os-item-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v2os-item-info strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.v2os-item-info small {
  color: var(--v2-muted);
  font-size: 12px;
}

.v2os-item-total {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
}

/* ── Resumen y entrega ────────────────────── */

.v2os-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v2os-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--v2-muted);
  font-size: 13px;
}

.v2os-row span:last-child {
  color: var(--v2-ink);
}

.v2os-row--discount span:last-child {
  color: #1d7a4a;
}

.v2os-row--total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--v2-line);
  color: var(--v2-ink);
  font-size: 16px;
  font-weight: 700;
}

.v2os-dl {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.v2os-dl dt {
  color: var(--v2-muted);
  font-size: 12px;
}

.v2os-dl dd {
  margin: 2px 0 0;
  color: var(--v2-ink);
  font-size: 13px;
  line-height: 1.45;
}

.v2os-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border: 1px solid #d6d6db;
  border-radius: 999px;
  background: #fff;
  color: var(--v2-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s ease;
}

.v2os-help svg {
  color: #1f9d55;
}

.v2os-help:hover {
  border-color: var(--v2-ink);
}

/* ── Breakpoints ─────────────────────────── */

@media (min-width: 700px) {
  .v2os-card {
    padding: 22px;
  }

  .v2os-step-label {
    font-size: 12px;
  }
}

@media (min-width: 1024px) {
  .v2os-body {
    margin-top: 28px;
  }

  .v2os-layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    gap: 20px;
    align-items: start;
  }

  .v2os-side {
    position: sticky;
    top: 86px;
  }

  .v2os-code {
    font-size: 26px;
  }
}
