/* Historial de pedidos guardado en el celular — EMCO (23 nov 2026) */
body .orders-btn{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:7px 12px;border-radius:11px;
  border:1px solid #f5b72d88;background:#f5b72d1a;color:#e6f0ff;font:800 12.5px/1 Outfit,Arial,sans-serif;cursor:pointer;
  box-shadow:0 0 12px #f5b72d26;-webkit-tap-highlight-color:transparent;white-space:nowrap}
body .orders-btn:active{transform:scale(.96)}
.orders-overlay{z-index:2147483100!important}
.orders-modal{position:fixed;z-index:2147483200;left:50%;top:50%;transform:translate(-50%,-48%);
  width:min(440px,calc(100% - 24px));max-height:min(760px,calc(100dvh - 32px));display:flex;flex-direction:column;
  background:linear-gradient(180deg,#0d1430f8,#070a18fa);color:#e6f0ff;border:1px solid #f5b72d66;border-radius:20px;
  box-shadow:0 0 50px #f5b72d22,0 30px 90px #000d;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s,visibility .2s}
.orders-modal.is-open{visibility:visible;opacity:1;pointer-events:auto;transform:translate(-50%,-50%)}
.orders-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px 12px;border-bottom:1px solid #ffffff1a;flex:none}
.orders-head small{font-size:9.5px;letter-spacing:1.8px;font-weight:800;color:#f5b72d}
.orders-head h2{margin:3px 0 0;font-size:22px;color:#fff}
.orders-list{overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:12px;flex:1 1 auto;overscroll-behavior:contain}
.order-card{border:1px solid #f5b72d33;background:#101a36cc;border-radius:14px;padding:12px 13px}
.order-card-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:8px}
.order-date{font-size:12px;color:#9fb3d6;font-weight:700}
.order-total{font:900 18px/1 Outfit,Arial,sans-serif;color:#f5b72d;text-shadow:0 0 10px #f5b72d55}
.order-items{list-style:none;margin:0 0 8px;padding:0;display:flex;flex-direction:column;gap:4px}
.order-items li{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:#fff}
.order-items li span:last-child{color:#b9c9e6;white-space:nowrap}
.order-meta{font-size:11.5px;color:#8d9bb8;margin-bottom:10px}
.order-repeat{width:100%;min-height:40px;border:0;border-radius:11px;cursor:pointer;font:800 13px/1 Outfit,Arial,sans-serif;
  background:linear-gradient(135deg,#f5b72d,#2f7fd1);color:#04101c}
.order-repeat:active{transform:scale(.98)}
.orders-empty{text-align:center;padding:36px 18px;color:#8d9bb8}
.orders-empty div{font-size:40px}
.orders-empty h3{color:#fff;margin:12px 0 6px;font-size:18px}
.orders-empty p{margin:0;font-size:13px;line-height:1.5}
.orders-clear{flex:none;margin:6px auto 14px;background:none;border:0;color:#ff8fb1;text-decoration:underline;font-size:12px;cursor:pointer}
@media(max-width:700px){
  .orders-modal{left:0;right:0;top:0;bottom:0;width:100%;max-height:none;height:100dvh;border-radius:0;border:0;transform:translateY(100%)}
  .orders-modal.is-open{transform:none}
  .orders-head{padding-top:max(14px,env(safe-area-inset-top))}
  .orders-clear{margin-bottom:max(14px,env(safe-area-inset-bottom))}
}
@media(max-width:380px){body .orders-btn{padding:7px 9px;font-size:11.5px}}

/* Encabezado siempre por encima del buscador al desplazarse (no se encima ni se distorsiona) */
html body .topbar{z-index:70!important;background:rgba(6,9,20,.94)!important}
/* Botón "Mis pedidos" compacto en celulares para que no apriete el logo */
@media(max-width:480px){
  body .orders-btn{min-height:36px;padding:6px 9px;font-size:11.5px;gap:4px;border-radius:10px}
  body .header-actions{gap:6px!important;flex-shrink:0}
  body .brand{min-width:0}
}

/* Datos guardados del cliente: tarjeta con botón Editar; los campos se ocultan hasta editar */
.driver-note{display:block;margin-top:2px;font-size:11.5px;font-weight:600;line-height:1.4;color:#ffe08a!important}
.checkout-form.has-saved-client .client-field{display:none!important}
.saved-client-card{margin:0 0 14px;padding:13px 14px;border-radius:14px;background:#f5b72d12;border:1px solid #f5b72d55;box-shadow:0 0 16px #f5b72d1a}
.saved-client-card[hidden]{display:none!important}
.saved-client-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.saved-client-head span{font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;font-weight:800;color:#ffe08a}
.saved-client-edit{border:1px solid #f5b72d88;background:#f5b72d1f;color:#e6f0ff;border-radius:9px;padding:6px 11px;font:800 12.5px/1 Outfit,Arial,sans-serif;cursor:pointer}
.saved-client-edit:active{transform:scale(.96)}
.saved-client-body{display:flex;flex-direction:column;gap:5px;font-size:14px;color:#e6f0ff}
.saved-client-body div{display:flex;gap:8px;align-items:flex-start;overflow-wrap:anywhere}
.saved-client-body span{flex:none;width:20px;text-align:center}
.saved-client-body strong{color:#fff}
.saved-client-driver{margin:10px 0 0;padding-top:9px;border-top:1px solid #ffffff1a;font-size:12px;font-weight:600;color:#ffe08a;line-height:1.4}
.saved-client-forget{display:block;margin:8px 0 0;background:none;border:0;padding:0;color:#ff8fb1;text-decoration:underline;font-size:11.5px;cursor:pointer}
.saved-data-msg{margin:12px 0 14px;padding:11px 13px;border-radius:12px;background:#f5b72d17;border:1px solid #f5b72d66;
  color:#e6f0ff!important;font-size:13.5px;font-weight:700;line-height:1.45;text-align:center;box-shadow:0 0 14px #f5b72d22}
.saved-data-msg[hidden]{display:none!important}

/* ===== Pedido rápido: con datos guardados, todo cabe en una sola pantalla ===== */
html body .checkout-modal.is-quick{padding:14px 16px 16px!important}
html body .checkout-modal.is-quick .checkout-head{margin-bottom:10px!important;padding-bottom:8px!important}
html body .checkout-modal.is-quick .checkout-head h2{font-size:20px!important;margin:2px 0 0!important}
html body .checkout-modal.is-quick .checkout-head small{font-size:9.5px!important}
html body .checkout-modal.is-quick .round-close{width:34px!important;height:34px!important;font-size:22px!important}
html body .checkout-modal.is-quick .id-verification-notice{padding:7px 10px!important;margin:0 0 10px!important;gap:8px!important;align-items:center!important}
html body .checkout-modal.is-quick .id-verification-notice p{font-size:11px!important;line-height:1.35!important;margin:0!important}
html body .checkout-modal.is-quick .id-verification-icon{font-size:18px!important}
html body .checkout-modal.is-quick .saved-client-card{padding:10px 12px;margin-bottom:10px}
html body .checkout-modal.is-quick .saved-client-head{margin-bottom:6px}
html body .checkout-modal.is-quick .saved-client-edit{padding:5px 10px;font-size:12px}
html body .checkout-modal.is-quick .saved-client-body{display:grid;grid-template-columns:1fr 1fr;gap:3px 10px;font-size:13px}
html body .checkout-modal.is-quick .saved-client-body div:nth-child(3){grid-column:1/-1}
html body .checkout-modal.is-quick .saved-client-driver{margin-top:7px;padding-top:6px;font-size:11px}
html body .checkout-modal.is-quick .saved-client-forget{margin-top:5px;font-size:11px}
html body .checkout-modal.is-quick .checkout-form label{margin-bottom:8px!important;gap:5px!important}
html body .checkout-modal.is-quick .checkout-form textarea[name=notas]{min-height:40px!important;height:40px;padding:9px 12px!important;resize:none}
html body .checkout-modal.is-quick .checkout-summary{padding:9px 12px!important;margin:2px 0 6px!important;flex-wrap:nowrap!important}
html body .checkout-modal.is-quick .checkout-summary span{font-size:12.5px}
html body .checkout-modal.is-quick .checkout-fee-detail{font-size:10.5px!important;line-height:1.3!important}
html body .checkout-modal.is-quick .checkout-summary strong{font-size:21px!important;white-space:nowrap}
html body .checkout-modal.is-quick .checkout-notice{font-size:10.5px!important;line-height:1.35!important;margin:0 0 8px!important}
html body .checkout-modal.is-quick #submitOrderBtn{min-height:48px!important;font-size:15px!important}
html body .checkout-modal.is-quick .checkout-form select[name=pago]{min-height:44px!important;padding:9px 12px!important}
.saved-client-actions{display:flex;align-items:center;gap:12px}
html body .saved-client-actions .saved-client-forget{margin:0!important}
html body .checkout-modal.is-quick .checkout-head small{display:none!important}
html body .checkout-modal.is-quick .checkout-head{margin-bottom:8px!important;padding-bottom:6px!important}
html body .checkout-modal.is-quick .id-verification-notice{margin-bottom:8px!important}
html body .checkout-modal.is-quick .checkout-form label{margin-bottom:6px!important}
