/* Recorrido de una comanda — pieza interactiva de "El Punto".
   Todo selector vive bajo [data-rec]; nombres de clase con prefijo rec-. */

[data-rec] {
  font-family: 'Archivo', system-ui, sans-serif;
  color: #201e1d;
  background: #ffffff;
  width: 100%;
  box-sizing: border-box;
  font-variant-numeric: tabular-nums;
  container-type: inline-size;
  container-name: rec;
}

[data-rec] *,
[data-rec] *::before,
[data-rec] *::after {
  box-sizing: border-box;
}

[data-rec] button {
  font: inherit;
}

[data-rec] button:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

[data-rec] button:active {
  transform: translateY(1px);
}

@keyframes rcIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes rcFlash {
  0%, 40% { background: #f1f7f2; }
  100% { background: #ffffff; }
}

@media (prefers-reduced-motion: reduce) {
  [data-rec] * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Cabecera ---------- */

.rec-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 56px;
}

.rec-eyebrow {
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #595756;
}

.rec-title {
  margin: 0;
  font-size: clamp(48px, 6.6vw, 104px);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.045em;
  line-height: 0.88;
}

.rec-title-nowrap {
  white-space: nowrap;
}

.rec-title-dot {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.04em;
  background: #201e1d;
}

.rec-subtitle {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  color: #595756;
  max-width: 34ch;
}

/* ---------- Progreso de pasos ---------- */

.rec-tracker {
  position: relative;
  margin-bottom: 32px;
}

.rec-track {
  position: absolute;
  left: 8px;
  top: 7px;
  width: 75%;
  height: 2px;
  background: #dcdada;
}

.rec-track-fill {
  position: absolute;
  left: 8px;
  top: 7px;
  width: var(--rec-fill-w, 0%);
  height: 2px;
  background: #201e1d;
  transition: width 200ms cubic-bezier(.2, .7, .2, 1);
}

.rec-steps {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rec-step {
  min-width: 0;
}

.rec-step-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 8px 4px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #201e1d;
  cursor: pointer;
  text-align: left;
}

.rec-step-dot {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.rec-step-dot-inner {
  display: block;
  width: 12px;
  height: 12px;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px #9f9d9d;
  transition: all 120ms cubic-bezier(.2, .7, .2, 1);
}

.rec-step-btn--current .rec-step-dot-inner {
  width: 16px;
  height: 16px;
  background: #1d4ed8;
  box-shadow: none;
}

.rec-step-btn--done .rec-step-dot-inner {
  width: 12px;
  height: 12px;
  background: #201e1d;
  box-shadow: none;
}

.rec-step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-step-label {
  font-size: 15px;
  font-weight: 700;
  color: #595756;
}

.rec-step-btn--current .rec-step-label,
.rec-step-btn--done .rec-step-label {
  color: #201e1d;
}

.rec-step-who {
  font-size: 13px;
  color: #595756;
}

/* Disposicion estrecha del progreso (contenedor < 600px) */

@container rec (max-width: 599px) {
  .rec-track { left: 7px; top: 28px; width: 2px; height: 168px; }
  .rec-track-fill { left: 7px; top: 28px; width: 2px; height: var(--rec-fill-h, 0px); }
  .rec-steps { display: flex; flex-direction: column; }
  .rec-step-btn { flex-direction: row; align-items: center; gap: 16px; height: 56px; padding: 0; }
}

@supports not (container-type: inline-size) {
  @media (max-width: 679px) {
    .rec-track { left: 7px; top: 28px; width: 2px; height: 168px; }
    .rec-track-fill { left: 7px; top: 28px; width: 2px; height: var(--rec-fill-h, 0px); }
    .rec-steps { display: flex; flex-direction: column; }
    .rec-step-btn { flex-direction: row; align-items: center; gap: 16px; height: 56px; padding: 0; }
  }
}

/* ---------- Cuerpo: escenario + panel de texto ---------- */

.rec-body {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 48px;
  align-items: stretch;
}

.rec-stage {
  flex: 999 1 560px;
  min-width: 0;
  background: #f3f2f2;
  padding: clamp(16px, 3vw, 40px);
  min-height: 580px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rec-figure {
  width: 100%;
  animation: rcIn 200ms cubic-bezier(.2, .7, .2, 1) both;
}

.rec-figure-row {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
}

.rec-panel {
  flex: 1 1 320px;
  min-width: 0;
  order: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

@container rec (max-width: 599px) {
  .rec-stage { min-height: 0; }
  .rec-panel { order: -1; }
}

@supports not (container-type: inline-size) {
  @media (max-width: 679px) {
    .rec-stage { min-height: 0; }
    .rec-panel { order: -1; }
  }
}

.rec-live {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #595756;
}

.rec-step-title {
  margin: 0;
  font-size: clamp(28px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.rec-step-body {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: #595756;
  max-width: 40ch;
}

.rec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #dcdada;
}

.rec-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #595756;
}

.rec-meta-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
}

.rec-meta-value--taberna { color: #2853c1; }
.rec-meta-value--sarea { color: #216f3c; }

.rec-dot-small {
  width: 8px;
  height: 8px;
  flex: none;
}

.rec-dot-small--taberna { background: #1d4ed8; }
.rec-dot-small--sarea { background: #138040; }

/* ---------- Acciones ---------- */

.rec-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rec-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  border: 0;
  border-radius: 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.rec-btn--prev {
  padding: 0 16px 0 12px;
  background: #eae9e9;
  color: #201e1d;
}

.rec-btn--prev:disabled {
  color: #9f9d9d;
  cursor: default;
}

.rec-btn--prev:disabled:active {
  transform: none;
}

.rec-btn--next {
  flex: 1 1 auto;
  justify-content: space-between;
  padding: 0 16px;
  background: #201e1d;
  color: #f3f2f2;
}

.rec-btn--play {
  padding: 0 16px 0 12px;
  background: #ffffff;
  color: #201e1d;
  box-shadow: inset 0 0 0 2px #6a6868;
}

.rec-hidden {
  display: none !important;
}

/* ---------- Bloques de dispositivo (maquetas) ---------- */

.rec-device {
  box-sizing: border-box;
  width: 100%;
}

.rec-device--tablet { background: #201e1d; padding: 14px; }
.rec-device--phone { background: #201e1d; padding: 10px 8px 18px; }
.rec-device--kitchen { background: #151413; padding: 12px; }

.rec-screen--light { background: #f3f2f2; }
.rec-screen--dark { background: #201e1d; color: #f3f2f2; }

.rec-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.rec-topbar--light { background: #ffffff; border-bottom: 1px solid #dcdada; }
.rec-topbar--dark { background: #151413; border-bottom: 1px solid #3a3837; }

.rec-topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.rec-topbar-time {
  font-size: 13px;
  color: #b4b2b2;
}

.rec-dot-sq {
  width: 8px;
  height: 8px;
  flex: none;
  display: inline-block;
}

.rec-dot-sq--blue { background: #1d4ed8; }
.rec-dot-sq--blue-mid { background: #6393ff; }
.rec-dot-sq--green { background: #138040; }

.rec-tabs {
  display: flex;
}

.rec-tab {
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #595756;
}

.rec-tab--active {
  background: #201e1d;
  color: #f3f2f2;
}

/* Sala: plano de mesas + cuenta */

.rec-sala-body {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
}

.rec-table-grid {
  flex: 1 1 200px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}

.rec-table-cell {
  position: relative;
  height: 64px;
  background: #eae9e9;
  padding: 8px;
  font-size: 16px;
  font-weight: 700;
}

.rec-table-cell--active {
  background: #201e1d;
  color: #f3f2f2;
  box-shadow: inset 0 0 0 3px #6393ff;
}

.rec-table-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: #6393ff;
}

.rec-table-pax {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 13px;
  font-weight: 400;
  color: #b4b2b2;
}

.rec-order {
  flex: 1 1 240px;
  min-width: 0;
  background: #ffffff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-order-title {
  font-size: 18px;
  font-weight: 800;
}

.rec-order-divider {
  border-top: 1px solid #dcdada;
}

.rec-order-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.rec-order-amount {
  white-space: nowrap;
}

.rec-order-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #2853c1;
  margin-top: -6px;
}

.rec-order-note-extra {
  color: #595756;
}

.rec-order-total-divider {
  border-top: 2px solid #9f9d9d;
  margin-top: 4px;
}

.rec-order-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.rec-order-total-label {
  font-size: 15px;
  font-weight: 700;
}

.rec-order-total-amount {
  font-size: 25px;
  font-weight: 800;
}

.rec-order-send {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  background: #2853c1;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

/* Cocina: comandas */

.rec-kitchen {
  flex: 999 1 340px;
  min-width: 0;
  max-width: 620px;
}

.rec-kitchen-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  padding: 12px;
}

.rec-ticket {
  background: #2d2b2b;
  box-shadow: 0 0 0 1px #ffffff14, 0 1px 2px #0000004d;
}

.rec-ticket--muted {
  background: #292726;
  box-shadow: none;
}

.rec-ticket-stripe {
  height: 6px;
  background: #6393ff;
}

.rec-ticket--muted .rec-ticket-stripe {
  background: #605d5d;
}

.rec-ticket-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-ticket-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.rec-ticket--muted .rec-ticket-title {
  color: #b4b2b2;
}

.rec-ticket-sub {
  font-size: 13px;
  color: #b4b2b2;
}

.rec-ticket-divider {
  border-top: 1px solid #3a3837;
}

.rec-ticket-line {
  font-size: 16px;
  font-weight: 700;
}

.rec-ticket--muted .rec-ticket-line {
  color: #b4b2b2;
}

.rec-ticket-note {
  font-size: 13px;
  font-weight: 400;
  color: #b4b2b2;
  margin-top: 2px;
}

.rec-ticket-line--done {
  color: #b4b2b2;
}

.rec-ticket-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 15px;
  font-weight: 700;
}

.rec-ticket-badge--ready { background: #243729; color: #93c69f; }
.rec-ticket-badge--late { background: #3e2f19; color: #dfad71; }

.rec-ticket-action {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  background: #6393ff;
  color: #201e1d;
  font-size: 15px;
  font-weight: 700;
}

/* Sala en miniatura (aviso de "Lista") */

.rec-sala-mini-wrap {
  flex: 1 1 200px;
  max-width: 240px;
}

.rec-sala-mini-screen {
  min-height: 300px;
  display: flex;
  flex-direction: column;
}

.rec-sala-mini-grid {
  position: relative;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rec-table-cell--small {
  height: 56px;
}

.rec-notification {
  margin: 0 8px;
  background: #ffffff;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: 0 8px 24px #2d2b2b24;
  border-left: 4px solid #216f3c;
}

.rec-notification-icon {
  flex: none;
}

.rec-notification-title {
  font-size: 15px;
  font-weight: 700;
}

.rec-notification-sub {
  font-size: 13px;
  color: #595756;
  margin-top: 2px;
}

/* Sarea en el móvil */

.rec-sarea-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.rec-sarea-device {
  max-width: 320px;
}

.rec-sarea-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.rec-sarea-header {
  background: #ffffff;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #dcdada;
}

.rec-sarea-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #216f3c;
}

.rec-sarea-title {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.rec-sarea-title-dot {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  margin-left: 0.04em;
  background: #138040;
}

.rec-sarea-date {
  font-size: 13px;
  color: #595756;
}

.rec-sarea-card {
  background: #ffffff;
  margin: 0 8px;
  padding: 12px;
}

.rec-sarea-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #595756;
}

.rec-sarea-total {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 8px;
}

.rec-sarea-sub {
  font-size: 13px;
  color: #595756;
  margin-top: 2px;
}

.rec-sarea-list {
  background: #ffffff;
  margin: 0 8px;
}

.rec-sarea-list-label {
  padding: 12px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #595756;
}

.rec-sale-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #ffffff;
}

.rec-sale-row--border {
  border-top: 1px solid #dcdada;
}

.rec-sale-row--new {
  animation: rcFlash 2400ms cubic-bezier(.2, .7, .2, 1) 200ms both;
}

.rec-sale-name {
  font-size: 15px;
  font-weight: 700;
}

.rec-sale-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #216f3c;
  margin-top: 2px;
}

.rec-sale-meta--muted {
  color: #595756;
}

.rec-sale-amount {
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}
