/* SHOP ENGINE — DEFAULT ORDER STATUS CSS
   FILE: /shop/assets/order-status.css
   SCOPE: Order tracking only. No brand or site-specific styling.
   Site themes may add overrides after this stylesheet later.
*/
:root{--os-bg:#f5f7fb;--os-panel:#fff;--os-text:#1c2940;--os-muted:#63728a;--os-border:#dae2ed;--os-primary:#285cc4}
*{box-sizing:border-box}html{scroll-behavior:smooth}body.shop-order-status{margin:0;background:var(--os-bg);color:var(--os-text);font-family:system-ui,-apple-system,'Segoe UI',Tahoma,sans-serif;font-size:15px;line-height:1.6}
a{color:var(--os-primary)}.os-container{width:min(1080px,calc(100% - 32px));margin:auto}
.os-header{background:#fff;border-bottom:1px solid var(--os-border)}.os-header-inner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:19px 0}.os-brand{font-size:19px;font-weight:800;color:var(--os-text);text-decoration:none}
.os-intro{margin:40px 0 24px}.os-intro small,.os-detail-head small{font-size:11px;letter-spacing:.12em;font-weight:800;color:var(--os-primary)}h1{font-size:clamp(26px,4vw,38px);margin:7px 0}h2{font-size:21px;margin:0 0 16px}h3{font-size:17px;margin:25px 0 10px}.os-intro p,.os-muted,.os-help{color:var(--os-muted)}
.os-panel{background:var(--os-panel);border:1px solid var(--os-border);border-radius:15px;padding:26px;margin:18px 0;box-shadow:0 4px 20px #182d4b0a}.os-form{display:grid;grid-template-columns:1fr 1fr auto;gap:14px;align-items:end}.os-field{min-width:0}.os-field label{display:block;font-weight:700;margin-bottom:7px}.os-field label strong{font-size:11px;color:var(--os-primary)}.os-field label span{font-weight:400;font-size:12px;color:var(--os-muted)}.os-field input{display:block;width:100%;min-height:46px;padding:11px 12px;border:1px solid #bbc9dc;border-radius:8px;font:inherit}.os-field input:focus{outline:2px solid #adc5f7;outline-offset:1px}
button{font:inherit;cursor:pointer} .os-form button{background:var(--os-primary);color:#fff;font-weight:700;border:0;border-radius:8px;min-height:46px;padding:10px 20px;white-space:nowrap}.os-secondary{border:1px solid #a8bce6;color:var(--os-primary);background:#fff;border-radius:8px;padding:9px 16px;font-weight:650}.os-help{font-size:13px;margin:15px 0 0}.os-alert{background:#fff3f2;border:1px solid #eac1bd;color:#963a34;padding:12px 20px;border-radius:10px}.os-alert p{margin:3px 0}
.os-orders{display:grid;gap:10px}.os-order{padding:13px 0;border-bottom:1px solid var(--os-border);display:flex;align-items:center;justify-content:space-between;gap:12px}.os-order:last-child{border:0}.os-order p{margin:4px 0 0;font-size:13px;color:var(--os-muted)}.os-detail-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.os-detail-head h2{margin:0}.os-status{background:#e8effb;color:#244d96;border-radius:100px;padding:7px 12px;font-weight:700;font-size:13px}.os-meta{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin:24px 0}.os-meta div{border-bottom:1px solid var(--os-border);padding-bottom:8px}.os-meta dt{font-size:12px;color:var(--os-muted)}.os-meta dd{margin:2px 0 0;font-weight:650}.os-table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:560px}th,td{text-align:left;padding:12px;border-bottom:1px solid var(--os-border)}th{background:#f6f8fc;font-size:13px}td small{display:block;color:var(--os-muted);font-size:12px}tfoot th{background:#f1f5fc}.os-footer{padding:36px 0;color:var(--os-muted);font-size:13px}
@media(max-width:780px){.os-form{grid-template-columns:1fr}.os-panel{padding:18px}.os-meta{grid-template-columns:1fr}.os-header-inner{padding:15px 0}}
/* V2 — Tabs and four-step order timeline / Default shared style only. */
.os-tabs{display:flex;gap:6px;border-bottom:1px solid var(--os-border);margin:4px 0 18px}
.os-tabs button{background:transparent;border:0;border-bottom:3px solid transparent;padding:12px 16px;color:var(--os-muted);font-weight:700;text-align:center}
.os-tabs button[aria-selected="true"]{color:var(--os-primary);border-bottom-color:var(--os-primary)}
.os-lookup{display:flex;gap:12px;align-items:end;flex-wrap:wrap}
.os-lookup[hidden]{display:none!important}.os-lookup .os-field{flex:1 1 210px}.os-lookup button[type="submit"]{border:0;border-radius:8px;padding:11px 20px;min-height:46px;background:var(--os-primary);color:#fff;font-weight:700}
.os-lookup .os-help{flex:1 1 100%;margin:2px 0 0}
.os-orders{gap:14px}.os-order-card{border:1px solid var(--os-border);border-radius:12px;padding:18px;background:#fff}
.os-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap}
.os-card-head small{font-size:11px;color:var(--os-muted)}.os-card-head h3{margin:2px 0;font-size:19px;overflow-wrap:anywhere}.os-card-head p{margin:1px 0;font-size:12px;color:var(--os-muted)}
.os-card-actions{display:flex;justify-content:flex-end;margin-top:12px}
.os-timeline{padding:0;margin:23px 0;list-style:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;counter-reset:orderstage}
.os-timeline li{position:relative;display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;color:#8490a1;font-size:13px;font-weight:600;min-width:0}
.os-step-icon{z-index:1;display:grid;place-items:center;width:52px;height:52px;background:#edf0f4;border:2px solid #d9dfe7;border-radius:50%;font-size:24px;color:#9aa4af}
.os-timeline li::before{content:"";position:absolute;top:25px;left:-50%;width:100%;height:5px;background:#e2e7ee}
.os-timeline li:first-child::before{display:none}
.os-timeline li.is-done .os-step-icon{background:#e5f3ed;border-color:#4ca77e;color:#16714a}
.os-timeline li.is-done{color:#216a50}.os-timeline li.is-done::before{background:#4ca77e}
.os-timeline li.is-current .os-step-icon{box-shadow:0 0 0 4px #d5efe3}
.os-timeline-compact{margin:18px 0 7px}.os-timeline-compact .os-step-icon{width:42px;height:42px;font-size:20px}.os-timeline-compact li::before{top:20px}.os-timeline-compact .os-step-label{font-size:11px}
.os-detail-head p{margin:3px 0 0}.os-track-link{display:inline-block;padding:9px 15px;background:#eef4ff;border-radius:8px;font-weight:700}
@media(max-width:520px){.os-tabs button{font-size:13px;flex:1;padding:12px 6px}.os-lookup button[type="submit"]{width:100%}.os-timeline .os-step-icon{width:38px;height:38px;font-size:18px}.os-timeline li::before{top:18px;height:3px}.os-timeline .os-step-label{font-size:10px;line-height:1.35}}

/* V4 — Shipping address and payment section (default-only). */
.os-wide{grid-column:1/-1}.os-meta dd{overflow-wrap:anywhere}
.os-payment{border:1px solid var(--os-border);border-radius:12px;background:#f9fbff;padding:18px;margin:23px 0}
.os-payment>h3{margin:0 0 8px}.os-payment-state{font-weight:700;margin:4px 0 15px}
.os-bank{display:grid;grid-template-columns:minmax(0,1fr) 165px;align-items:start;gap:20px;padding:15px;background:#fff;border:1px solid var(--os-border);border-radius:10px}
.os-bank img{width:165px;max-width:100%;height:auto;object-fit:contain}.os-bank strong{font-weight:700}
.os-slip-form{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end;margin-top:15px}.os-slip-form button{grid-column:1/-1;width:max-content;padding:10px 18px;border:0;border-radius:8px;background:var(--os-primary);color:#fff;font-weight:700}
.os-success{background:#effbf4;border:1px solid #afe1c1;color:#216845;border-radius:10px;padding:15px 20px}
@media(max-width:650px){.os-bank{grid-template-columns:1fr}.os-slip-form{grid-template-columns:1fr}.os-slip-form button{width:100%}}

/* V5 — concise order view: 5 stages, inline payment, private recipient, product thumbnails */
.os-detail-panel{padding:22px 25px}
.os-detail-panel .os-timeline{grid-template-columns:repeat(5,minmax(0,1fr));margin:19px 0 13px}
.os-timeline{grid-template-columns:repeat(5,minmax(0,1fr))}
.os-detail-panel .os-timeline .os-step-icon{width:44px;height:44px;font-size:20px}
.os-detail-panel .os-timeline li::before{top:21px;height:4px}
.os-detail-panel .os-timeline li{font-size:12px;gap:4px}
.os-next-action{padding:10px 0 13px;border-bottom:1px solid var(--os-border);font-size:14px}
.os-next-action p{margin:3px 0}
.os-next-action small{color:var(--os-muted);display:block;margin-top:7px}
.os-action-title{display:flex;flex-wrap:wrap;gap:5px 12px;align-items:baseline}
.os-action-title span{color:var(--os-muted)}
.os-bank-inline{display:flex;align-items:center;gap:15px;margin-top:12px;font-size:13px}
.os-bank-inline img{width:85px;height:85px;object-fit:contain;border:1px solid var(--os-border);border-radius:7px}
.os-bank-inline strong{font-size:18px}
.os-slip-inline{display:flex;align-items:end;gap:9px;flex-wrap:wrap;margin:12px 0 0}
.os-slip-inline .os-field{flex:1 1 210px}
.os-slip-inline .os-field label{font-size:12px;font-weight:600}
.os-slip-inline .os-field input{min-height:40px;padding:7px 10px;font-size:13px}
.os-slip-inline button{grid-column:auto;min-height:40px;white-space:nowrap}
.os-essentials{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px;row-gap:9px;margin:17px 0}
.os-essentials>div{min-width:0}
.os-essentials strong{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.os-minor-label{display:block;font-size:11px;color:var(--os-muted);margin-bottom:2px}
.os-essentials .os-address,.os-essentials .os-note{grid-column:1/-1}
.os-note{font-size:13px;line-height:1.5}
.os-track-link{display:inline-block;font-size:12px;padding:3px 9px;margin-top:4px}
.os-products-title{margin:16px 0 8px}
.os-products{border-top:1px solid var(--os-border)}
.os-product{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid var(--os-border);align-items:center}
.os-product-photo{width:64px;height:64px;flex:0 0 64px;border-radius:9px;background:#f1f4f9;border:1px solid var(--os-border);overflow:hidden;display:grid;place-items:center}
.os-product-photo img{width:100%;height:100%;object-fit:contain}
.os-product-photo.os-no-image:after{content:'ไม่มีรูป';font-size:10px;color:var(--os-muted)}
.os-product-info{min-width:0;flex:1;font-size:13px}
.os-product-info strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.45}
.os-product-info small,.os-product-info span{display:block;font-size:12px;color:var(--os-muted);line-height:1.4;margin-top:3px}
.os-product-price{white-space:nowrap;margin-left:auto;font-size:14px}
.os-grand-total{display:flex;justify-content:space-between;gap:12px;padding:12px 0 0;font-weight:700}
.os-sum-note{margin:3px 0 0;font-size:11px}
@media(max-width:600px){.os-detail-panel{padding:16px}.os-detail-panel .os-timeline .os-step-icon{width:32px;height:32px;font-size:16px}.os-detail-panel .os-timeline li::before{top:15px;height:3px}.os-detail-panel .os-timeline .os-step-label{font-size:10px}.os-essentials{grid-template-columns:1fr}.os-slip-inline button{width:100%}.os-product-photo{width:56px;height:56px;flex-basis:56px}.os-product-price{font-size:12px}}

/* V6 — customer-care messaging / compact support states */
body.shop-order-status .os-intro{margin-bottom:18px}
body.shop-order-status .os-intro p{max-width:740px;margin-top:7px}
body.shop-order-status .os-support-message{background:#f0f6ff;border-color:#cadef6;color:#264970}
body.shop-order-status .os-support-message strong{display:block;margin-bottom:3px}
body.shop-order-status .os-empty-care{padding:13px 0 4px;max-width:750px}
body.shop-order-status .os-empty-care strong{font-size:16px}
body.shop-order-status .os-empty-care p{color:var(--os-muted);margin:7px 0}
body.shop-order-status .os-care-line{font-size:13px;color:#356078;margin:0 0 8px}
body.shop-order-status .os-footer{padding-bottom:80px}
