/* «Pedidos y pagos» (js/pedidos.js, SPEC-010 F3). Mobile first: one column,
   44 px touch targets, nothing wider than the screen. Colours come from the
   site's tokens (style.css), so light and dark follow data-theme. */
.pedidos { max-width: 52rem; min-width: 0; }
.pedidos-titulo { font-family: Fraunces, Georgia, serif; margin: 0 0 1rem; }
.pedidos-grupo { margin: 0 0 1.6rem; }
.pedidos-grupo-titulo { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
                        color: var(--dim); margin: 0 0 .6rem; }
.pedidos-grupo--yours .pedidos-grupo-titulo { color: var(--gold); }
.pedidos-lista { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }

.pedido { border: 1px solid var(--line); border-radius: .7rem; padding: .85rem 1rem; background: var(--surface);
          min-width: 0; overflow-wrap: anywhere; }
.pedidos-grupo--yours .pedido { border-color: var(--gold); }
.pedido-cabeza { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .35rem 1rem; }
.pedido-nombre { font-weight: 500; color: var(--ink); }
.pedido-estado { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
                 padding: .15rem .5rem; border-radius: 1rem; border: 1px solid var(--line-2, var(--line)); color: var(--muted); }
.pedido-estado--yours { border-color: var(--gold); color: var(--gold); }
.pedido-meta, .pedido-espera, .pedido-nota { margin: .35rem 0 0; font-size: .85rem; line-height: 1.45; }
.pedido-meta { color: var(--muted); }
.pedido-espera { color: var(--ink); }
.pedido-nota { color: var(--ink); }
.pedido-como-pagar { padding: .5rem .7rem; border-radius: .5rem; background: var(--surface-2, transparent);
                     border: 1px solid var(--line); white-space: pre-line; }

.pedido-accion { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.pedido-accion button, .pedidos-reintentar, .pedidos-ir-libro { min-height: 44px; }
/* «Pagar ahora» (SPEC-037 RF4): this rule loads after css/estudio.css and used to paint gold text on the
   gold button. The studio's gold with its legible ink, in every theme (the same tokens as .estudio .btn-primario). */
.pedido-accion .btn-primario { background: var(--studio-gold, var(--gold)); border-color: var(--studio-gold, var(--gold));
                               color: var(--studio-on-gold, #15171a); font-weight: 600; }
.pedido-accion button:disabled { cursor: progress; opacity: .65; filter: none; }

/* SPEC-071: the shared pay buttons (js/wallet.js payChoice) in «Pedidos y pagos», the order
   dialog and the book's «Pagar» step: balance first, card beside it, or what is missing. */
.wallet-pay-choice { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.wallet-pay-choice button, .wallet-pay-choice .wallet-topup-link { min-height: 44px; }
.wallet-pay-choice .wallet-topup-link { display: inline-flex; align-items: center; text-decoration: none; }
.wallet-pay-choice .wallet-short, .wallet-pay-choice .pedido-espera { flex-basis: 100%; margin: 0; font-size: .85rem; color: var(--ink); }
.wallet-pay-choice .btn-primario { background: var(--studio-gold, var(--gold)); border-color: var(--studio-gold, var(--gold));
                                   color: var(--studio-on-gold, #15171a); font-weight: 600; }
.wallet-pay-choice button:disabled { cursor: progress; opacity: .65; }

.pedido-enlaces { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; margin: .6rem 0 0; }
.pedido-enlaces .btn-tenue { min-height: 44px; display: inline-flex; align-items: center; }
.pedido-enlaces button:disabled { cursor: progress; }

.pedidos-mensaje, .pedidos-vacio { margin: 0 0 1rem; }
.pedidos-pie { margin: 1rem 0 0; font-size: .8rem; color: var(--dim); }

.pedido :focus-visible, .pedidos-reintentar:focus-visible, .pedidos-ir-libro:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px; }

@media (min-width: 640px) {
  .pedido { padding: 1rem 1.2rem; }
  .pedido-enlaces .btn-tenue { min-height: 0; }
}
