/* GAINVO Storefront v0.10.40 — Phase 8 Orders responsive refinement */

/* Orders page rhythm */
.screen[data-screen="orders"]{
  --orders-gap:14px;
  --orders-radius:18px;
}
.screen[data-screen="orders"] .orders-native-head{
  align-items:center;
  gap:14px;
  margin-bottom:14px;
}
.screen[data-screen="orders"] .orders-native-head h1{
  margin:2px 0 4px;
  font-size:clamp(22px,5.8vw,28px);
  line-height:1.08;
  letter-spacing:-.035em;
}
.screen[data-screen="orders"] .orders-native-head p{
  margin:0;
  max-width:520px;
  font-size:14px;
  line-height:1.45;
}
.screen[data-screen="orders"] .orders-refresh-button{
  min-width:44px;
  min-height:44px;
  padding:0 13px;
  border-radius:14px;
}
.screen[data-screen="orders"] .orders-refresh-button svg{width:19px;height:19px}
.screen[data-screen="orders"] .orders-refresh-button span{font-size:13px}
.screen[data-screen="orders"] .orders-stack{display:grid;gap:var(--orders-gap)}

/* Summary: glanceable, not dashboard-heavy */
.screen[data-screen="orders"] .order-summary-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin:0 0 16px;
}
.screen[data-screen="orders"] .order-summary-strip>div{
  min-width:0;
  padding:11px 10px;
  border-radius:14px;
  box-shadow:none;
}
.screen[data-screen="orders"] .order-summary-strip span{
  font-size:12px;
  line-height:1.25;
  white-space:normal;
}
.screen[data-screen="orders"] .order-summary-strip strong{
  margin-top:4px;
  font-size:20px;
  line-height:1;
}

/* Group headings */
.screen[data-screen="orders"] .orders-group{display:grid;gap:10px}
.screen[data-screen="orders"] .orders-group+.orders-group{margin-top:8px}
.screen[data-screen="orders"] .orders-group-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
}
.screen[data-screen="orders"] .orders-group-head .micro{font-size:11px}
.screen[data-screen="orders"] .orders-group-head h2{
  margin:2px 0 0;
  font-size:20px;
  line-height:1.15;
  letter-spacing:-.025em;
}
.screen[data-screen="orders"] .orders-group-head p{
  margin:4px 0 0;
  max-width:620px;
  font-size:13px;
  line-height:1.4;
}
.screen[data-screen="orders"] .orders-group-head>span{
  flex:0 0 auto;
  min-width:30px;
  height:30px;
  padding:0 8px;
  display:grid;
  place-items:center;
  border-radius:999px;
  font-size:12px;
  font-weight:850;
}

/* Payment confirmation */
.screen[data-screen="orders"] .order-confirmation-banner{
  grid-template-columns:42px minmax(0,1fr);
  gap:11px;
  padding:13px;
  margin:0 0 10px;
  border-radius:16px;
}
.screen[data-screen="orders"] .confirmation-check{
  width:42px;height:42px;border-radius:13px;font-size:19px;
}
.screen[data-screen="orders"] .order-confirmation-banner .micro{font-size:10.5px}
.screen[data-screen="orders"] .order-confirmation-banner h2{
  margin:2px 0 3px;
  font-size:16px;
  line-height:1.2;
}
.screen[data-screen="orders"] .order-confirmation-banner p{font-size:13px;line-height:1.4}

/* Active order card */
.screen[data-screen="orders"] .customer-order-card.customer-order-card-v2{
  width:100%;
  min-width:0;
  padding:14px;
  border-radius:var(--orders-radius);
  box-shadow:none;
  overflow:hidden;
  contain:layout paint;
}
.screen[data-screen="orders"] .customer-order-head{display:block}
.screen[data-screen="orders"] .order-business-copy{width:100%;min-width:0}
.screen[data-screen="orders"] .order-business-copy>.micro{font-size:11px;letter-spacing:.07em}
.screen[data-screen="orders"] .customer-order-head h3{
  margin:3px 0 2px;
  font-size:18px;
  line-height:1.15;
  letter-spacing:-.025em;
  overflow-wrap:anywhere;
}
.screen[data-screen="orders"] .customer-order-subtitle{
  margin:0 0 9px;
  font-size:13px;
  line-height:1.35;
}
.screen[data-screen="orders"] .order-state-row{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  flex-wrap:wrap;
}
.screen[data-screen="orders"] .order-badge-row{gap:6px}
.screen[data-screen="orders"] .customer-payment-badge,
.screen[data-screen="orders"] .customer-order-status{
  min-height:30px;
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  line-height:1;
  font-weight:850;
}

/* Five-step progress: always contained inside the card */
.screen[data-screen="orders"] .order-timeline{
  position:relative;
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  width:100%;
  height:auto;
  min-height:92px;
  margin:13px 0;
  padding:12px 4px 9px;
  overflow:hidden!important;
  border-radius:15px;
  box-sizing:border-box;
}
.screen[data-screen="orders"] .order-step{
  min-width:0!important;
  width:auto!important;
  gap:6px;
  align-content:start;
}
.screen[data-screen="orders"] .order-step:not(:last-child)::after{
  top:13px;
  left:56%;
  width:88%;
  height:2px;
}
.screen[data-screen="orders"] .order-step-dot{
  width:26px;
  height:26px;
  font-size:11px;
}
.screen[data-screen="orders"] .order-step>div{min-width:0;width:100%}
.screen[data-screen="orders"] .order-step strong{
  display:block;
  width:100%;
  max-width:none!important;
  font-size:10.5px!important;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.screen[data-screen="orders"] .order-step small{
  display:none!important;
}

/* Items and totals */
.screen[data-screen="orders"] .customer-order-lines{
  display:grid;
  gap:0;
  margin:0;
  padding:6px 0;
  font-size:13px;
}
.screen[data-screen="orders"] .customer-order-lines>div{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:start;
  padding:8px 0;
  font-size:13px;
  line-height:1.35;
}
.screen[data-screen="orders"] .customer-order-lines>div span{min-width:0;overflow-wrap:anywhere}
.screen[data-screen="orders"] .customer-order-lines>div strong{white-space:nowrap;font-size:13px}
.screen[data-screen="orders"] .customer-order-total{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  padding:13px 0 4px;
}
.screen[data-screen="orders"] .customer-order-total span{font-size:13px}
.screen[data-screen="orders"] .customer-order-total strong{
  font-size:23px;
  line-height:1;
  letter-spacing:-.035em;
  white-space:nowrap;
}
.screen[data-screen="orders"] .customer-order-help{
  margin:10px 0 0;
  padding:10px 11px;
  border-radius:12px;
  font-size:13px;
  line-height:1.4;
  overflow-wrap:anywhere;
}

/* Ready / handover */
.screen[data-screen="orders"] .order-handover-card{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  margin:12px 0 0;
  padding:12px;
  border-radius:15px;
}
.screen[data-screen="orders"] .order-handover-card .micro{font-size:10.5px}
.screen[data-screen="orders"] .order-handover-card strong{font-size:14px;line-height:1.25}
.screen[data-screen="orders"] .order-handover-card p{margin:4px 0 0;font-size:12.5px;line-height:1.4}
.screen[data-screen="orders"] .order-complete-button{
  min-height:44px;
  padding:0 14px;
  border-radius:12px;
  font-size:13px;
  white-space:nowrap;
}

/* Payment panel */
.screen[data-screen="orders"] .customer-pay-panel{
  gap:10px;
  padding:12px;
  margin-top:12px;
  border-radius:15px;
}
.screen[data-screen="orders"] .customer-pay-panel strong{font-size:14px}
.screen[data-screen="orders"] .customer-pay-panel p{font-size:12.5px;line-height:1.4}
.screen[data-screen="orders"] .customer-pay-email{font-size:12px}
.screen[data-screen="orders"] .customer-pay-email input{min-height:44px;font-size:16px}
.screen[data-screen="orders"] .customer-pay-button{min-height:44px;font-size:13px;border-radius:12px}

/* Completed order history: intentionally compact */
.screen[data-screen="orders"] .orders-history-list{display:grid;gap:8px}
.screen[data-screen="orders"] .order-history-card{
  overflow:hidden;
  border-radius:15px;
}
.screen[data-screen="orders"] .order-history-toggle{
  min-height:72px;
  padding:11px 12px;
  gap:10px;
}
.screen[data-screen="orders"] .history-order-leading{gap:9px;min-width:0}
.screen[data-screen="orders"] .history-order-state{
  width:34px;height:34px;flex:0 0 34px;font-size:13px;
}
.screen[data-screen="orders"] .history-order-copy{min-width:0}
.screen[data-screen="orders"] .history-order-copy .micro{font-size:10px}
.screen[data-screen="orders"] .history-order-copy strong{
  display:block;
  margin-top:2px;
  font-size:14px;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.screen[data-screen="orders"] .history-order-copy small{
  display:block;
  margin-top:3px;
  font-size:11.5px;
  line-height:1.3;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.screen[data-screen="orders"] .history-order-meta{gap:4px}
.screen[data-screen="orders"] .history-order-meta>strong{font-size:14px;white-space:nowrap}
.screen[data-screen="orders"] .history-status{font-size:10.5px;padding:4px 7px}
.screen[data-screen="orders"] .history-chevron{font-size:15px}
.screen[data-screen="orders"] .order-history-detail{padding:0 12px 12px}
.screen[data-screen="orders"] .history-detail-summary{font-size:12.5px;padding:10px 0}
.screen[data-screen="orders"] .compact-history-lines>div{font-size:12.5px}
.screen[data-screen="orders"] .post-purchase-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.screen[data-screen="orders"] .post-purchase-actions button{
  min-height:42px;
  padding:0 12px;
  border-radius:11px;
  font-size:12.5px;
}

/* Transaction history */
.screen[data-screen="orders"] .order-history{margin:13px 0 4px}
.screen[data-screen="orders"] .order-history-head{margin-bottom:8px}
.screen[data-screen="orders"] .order-history-head .micro{font-size:10px}
.screen[data-screen="orders"] .order-history-head strong{font-size:11px}
.screen[data-screen="orders"] .order-history-list{border-radius:13px}
.screen[data-screen="orders"] .order-history-row{
  grid-template-columns:30px minmax(0,1fr) auto;
  gap:9px;
  padding:10px;
}
.screen[data-screen="orders"] .order-history-dot{width:26px;height:26px;font-size:10px}
.screen[data-screen="orders"] .order-history-row strong{font-size:12.5px;line-height:1.25}
.screen[data-screen="orders"] .order-history-row small{font-size:11px;line-height:1.3}
.screen[data-screen="orders"] .order-history-row time{font-size:10.5px}

/* Loading / empty states */
.screen[data-screen="orders"] .orders-loading{
  min-height:120px;
  padding:18px;
  border-radius:16px;
}
.screen[data-screen="orders"] .orders-loading strong{font-size:14px}
.screen[data-screen="orders"] .orders-loading small{font-size:12px}
.screen[data-screen="orders"] .orders-empty{
  max-width:520px;
  padding:26px 18px;
  border-radius:18px;
}
.screen[data-screen="orders"] .orders-empty .empty-icon{font-size:30px}
.screen[data-screen="orders"] .orders-empty h2{font-size:20px}
.screen[data-screen="orders"] .orders-empty p{font-size:13px;line-height:1.45}
.screen[data-screen="orders"] .orders-empty .primary-cta{min-height:44px;font-size:13px}

/* Receipt sheet */
.order-receipt-sheet .gainvo-receipt{
  max-width:560px;
  margin:0 auto;
  padding:16px;
  border-radius:18px;
}
.order-receipt-sheet .receipt-brand{gap:10px;padding-bottom:12px}
.order-receipt-sheet .receipt-mark{width:42px;height:42px;border-radius:12px;font-size:19px}
.order-receipt-sheet .receipt-brand .micro{font-size:10px}
.order-receipt-sheet .receipt-brand h3{font-size:17px}
.order-receipt-sheet .receipt-meta{gap:8px;margin:12px 0}
.order-receipt-sheet .receipt-meta>div{padding:9px;border-radius:11px}
.order-receipt-sheet .receipt-meta span{font-size:10px}
.order-receipt-sheet .receipt-meta strong{font-size:12px;line-height:1.3}
.order-receipt-sheet .receipt-lines>div{padding:7px 0;font-size:12.5px}
.order-receipt-sheet .receipt-total{padding:13px 0}
.order-receipt-sheet .receipt-total span{font-size:12px}
.order-receipt-sheet .receipt-total strong{font-size:22px}
.order-receipt-sheet .receipt-payment{padding:10px;border-radius:12px}
.order-receipt-sheet .receipt-payment strong{font-size:12.5px}
.order-receipt-sheet .receipt-payment small{font-size:10.5px}
.order-receipt-sheet .receipt-note{font-size:11px;line-height:1.45}

/* Mobile phones */
@media (max-width: 600px){
  .screen[data-screen="orders"]{--orders-gap:12px;--orders-radius:17px}
  .screen[data-screen="orders"] .orders-native-head{align-items:flex-start}
  .screen[data-screen="orders"] .orders-refresh-button{padding:0;width:44px;min-width:44px}
  .screen[data-screen="orders"] .orders-refresh-button span{display:none}
  .screen[data-screen="orders"] .order-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .screen[data-screen="orders"] .order-summary-strip>div{padding:10px 11px}
  .screen[data-screen="orders"] .order-summary-strip strong{font-size:19px}
  .screen[data-screen="orders"] .orders-group-head h2{font-size:18px}
  .screen[data-screen="orders"] .orders-group-head p{font-size:12.5px}
  .screen[data-screen="orders"] .customer-order-card.customer-order-card-v2{padding:13px}
  .screen[data-screen="orders"] .customer-order-head h3{font-size:17px}
  .screen[data-screen="orders"] .customer-order-total strong{font-size:22px}
  .screen[data-screen="orders"] .order-handover-card{grid-template-columns:1fr}
  .screen[data-screen="orders"] .order-complete-button{width:100%}
  .screen[data-screen="orders"] .customer-pay-panel{grid-template-columns:1fr}
  .screen[data-screen="orders"] .customer-pay-button{width:100%}
  .screen[data-screen="orders"] .post-purchase-actions{display:grid;grid-template-columns:1fr 1fr}
  .screen[data-screen="orders"] .post-purchase-actions button:first-child{grid-column:1/-1}
  .order-receipt-sheet .receipt-meta{grid-template-columns:1fr 1fr}
}

/* Very small phones */
@media (max-width: 359px){
  .screen[data-screen="orders"] .orders-native-head h1{font-size:21px}
  .screen[data-screen="orders"] .orders-native-head p{font-size:12.5px}
  .screen[data-screen="orders"] .order-summary-strip span{font-size:11px}
  .screen[data-screen="orders"] .order-summary-strip strong{font-size:18px}
  .screen[data-screen="orders"] .customer-order-card.customer-order-card-v2{padding:12px}
  .screen[data-screen="orders"] .customer-order-head h3{font-size:16px}
  .screen[data-screen="orders"] .customer-order-subtitle{font-size:12px}
  .screen[data-screen="orders"] .customer-payment-badge,
  .screen[data-screen="orders"] .customer-order-status{font-size:11px;min-height:28px;padding:5px 8px}
  .screen[data-screen="orders"] .order-timeline{padding-inline:2px;min-height:86px}
  .screen[data-screen="orders"] .order-step-dot{width:24px;height:24px}
  .screen[data-screen="orders"] .order-step:not(:last-child)::after{top:12px}
  .screen[data-screen="orders"] .order-step strong{font-size:9px!important}
  .screen[data-screen="orders"] .customer-order-lines>div{font-size:12px}
  .screen[data-screen="orders"] .customer-order-total strong{font-size:20px}
  .screen[data-screen="orders"] .history-order-state{width:32px;height:32px;flex-basis:32px}
  .screen[data-screen="orders"] .history-order-copy strong{font-size:13px}
  .screen[data-screen="orders"] .history-order-meta>strong{font-size:13px}
  .screen[data-screen="orders"] .history-status{display:none}
  .screen[data-screen="orders"] .post-purchase-actions{grid-template-columns:1fr}
  .screen[data-screen="orders"] .post-purchase-actions button:first-child{grid-column:auto}
  .order-receipt-sheet .receipt-meta{grid-template-columns:1fr}
}

/* Tablets and desktop */
@media (min-width: 760px){
  .screen[data-screen="orders"]{max-width:940px;margin-inline:auto}
  .screen[data-screen="orders"] .orders-native-head h1{font-size:30px}
  .screen[data-screen="orders"] .order-summary-strip{gap:10px}
  .screen[data-screen="orders"] .order-summary-strip>div{padding:13px}
  .screen[data-screen="orders"] .order-summary-strip strong{font-size:22px}
  .screen[data-screen="orders"] .customer-order-card.customer-order-card-v2{padding:18px}
  .screen[data-screen="orders"] .customer-order-head h3{font-size:19px}
  .screen[data-screen="orders"] .order-timeline{min-height:96px;padding-inline:10px}
  .screen[data-screen="orders"] .order-step strong{font-size:11px!important}
  .screen[data-screen="orders"] .customer-order-lines>div{font-size:13.5px}
  .screen[data-screen="orders"] .customer-order-total strong{font-size:24px}
  .screen[data-screen="orders"] .order-history-toggle{min-height:76px;padding:12px 14px}
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  .screen[data-screen="orders"] *,
  .order-receipt-sheet *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
