/* Printdura Orders v2.4: page-scoped styles. */
.modern-orders { --orders-accent:var(--pd-site-accent,#f15a24); --orders-border:var(--pd-site-border,#ece9df); padding:16px; color:#413835; background:#fffdf9; font-family:inherit; }
.modern-orders * { box-sizing:border-box; }
.modern-orders [hidden] { display:none !important; }
.modern-orders .orders-search { position:relative; margin-bottom:20px; }
.modern-orders .orders-search::before { content:""; position:absolute; left:16px; top:50%; transform:translateY(-50%); width:17px; height:17px; pointer-events:none; background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23756d68'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E"); }
.modern-orders .orders-search input { padding:12px 16px 12px 44px !important; min-height:48px; margin:0; }
.modern-orders .orders-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:24px; }
.modern-orders .filter-group { min-width:0; }
.modern-orders .filter-label { display:block; margin-bottom:8px; font-size:14px; font-weight:600; }
.modern-orders .filter-select { min-height:46px; padding:10px 36px 10px 12px !important; margin:0; appearance:none; background:#fffdf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23413835'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") right 12px center/16px no-repeat; }
.modern-orders :is(input,select):focus-visible { outline:2px solid var(--orders-accent); outline-offset:2px; }
.modern-orders .orders-table-wrapper { border:1px solid var(--orders-border); border-radius:var(--pd-card-radius,12px); overflow:hidden; }
.modern-orders .table-scroll-container { overflow-x:auto; }
.modern-orders .orders-table { width:100%; border-collapse:collapse; margin:0; }
.modern-orders .orders-table :is(th,td) { padding:16px; border-bottom:1px solid var(--orders-border); vertical-align:middle; font-size:14px; text-align:left; }
.modern-orders .orders-table th { font-size:12px; text-transform:uppercase; letter-spacing:.04em; background:#f7f5f3; white-space:nowrap; }
.modern-orders .orders-table tbody tr:last-child td { border-bottom:0; }
.modern-orders .orders-table td:nth-child(2) { min-width:240px; }
.modern-orders .order-number a { color:inherit; font-weight:600; text-decoration:none; }
.modern-orders .product-info { display:flex; align-items:center; gap:12px; }
.modern-orders .product-image { width:52px; height:52px; flex:0 0 52px; object-fit:contain; border:1px solid var(--orders-border); border-radius:8px; background:#fff; }
.modern-orders .product-details { min-width:0; }
.modern-orders .product-name { display:block; font-weight:600; line-height:1.4; margin-bottom:6px; overflow-wrap:anywhere; }
.modern-orders .product-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.modern-orders :is(.product-variation,.qty-badge,.more-items) { display:inline-flex; padding:3px 8px; border:1px solid var(--orders-border); border-radius:6px; background:#f7f5f3; font-size:12px; line-height:1.5; }
.modern-orders .status-badge { display:inline-flex; padding:5px 10px; border-radius:20px; border:1px solid #d8d8d8; background:#f7f5f3; font-size:12px; font-weight:600; white-space:nowrap; }
.modern-orders :is(.status-processing,.status-pending) { color:#a93b11; border-color:#e8b8a5; background:#fff2eb; }
.modern-orders :is(.status-completed,.status-delivered) { color:#176342; border-color:#b9dacb; background:#edf7f1; }
.modern-orders :is(.status-failed,.status-cancelled) { color:#913333; border-color:#e5c1c1; background:#fff1f1; }
.modern-orders .order-actions { display:flex; flex-wrap:wrap; gap:8px; }
.modern-orders .order-actions a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:8px 14px !important; border:1px solid var(--orders-border) !important; border-radius:8px !important; color:#413835 !important; background:#fff !important; font-size:14px !important; font-weight:600; text-decoration:none; white-space:nowrap; }
.modern-orders .order-actions .pay-button { color:#fff !important; background:var(--orders-accent) !important; border-color:var(--orders-accent) !important; }
.modern-orders .order-actions a:focus-visible { outline:2px solid var(--orders-accent); outline-offset:2px; }
.modern-orders .empty-orders { text-align:center; padding:40px 20px; border:1px solid var(--orders-border); border-radius:var(--pd-card-radius,12px); }
.modern-orders .empty-orders h3 { font-size:18px; margin:0 0 8px; }
.modern-orders .empty-orders p { margin:0; }
@media(max-width:768px) {
 .modern-orders .orders-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .modern-orders .filter-group:last-child { grid-column:1 / -1; }
 .modern-orders .orders-table-wrapper { border:0; overflow:visible; }
 .modern-orders .table-scroll-container { overflow:visible; }
 .modern-orders .orders-table, .modern-orders .orders-table tbody { display:block; }
 .modern-orders .orders-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
 .modern-orders .orders-table .order-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 16px; padding:16px; margin-bottom:16px; border:1px solid var(--orders-border); border-radius:var(--pd-card-radius,12px); background:#fff; }
 .modern-orders .orders-table td { display:block; min-width:0 !important; padding:0; border:0; overflow-wrap:anywhere; }
 .modern-orders .orders-table td::before { content:attr(data-label); display:block; font-size:12px; color:#756d68; margin-bottom:4px; }
 .modern-orders .orders-table td:nth-child(1) { grid-column:1; grid-row:1; }
 .modern-orders .orders-table td:nth-child(5) { grid-column:2; grid-row:1; text-align:right; }
 .modern-orders .orders-table td:nth-child(2) { grid-column:1 / -1; grid-row:2; padding-bottom:12px; border-bottom:1px solid var(--orders-border); }
 .modern-orders .orders-table td:nth-child(2)::before, .modern-orders .orders-table td:nth-child(7)::before { display:none; }
 .modern-orders .orders-table td:nth-child(7) { grid-column:1 / -1; }
 .modern-orders .order-actions a { flex:1 1 auto; }
}
@media(max-width:359px) { .modern-orders .orders-filters { grid-template-columns:1fr; } }

/* Filter toolbar v2.5 */
.modern-orders .orders-search input { border-radius:var(--pd-card-radius,12px) !important; background:#fff !important; }
.modern-orders .orders-filters { grid-template-columns:1fr 1fr 1.25fr; gap:12px; margin-bottom:16px; }
.modern-orders .filter-label { font-size:12px; font-weight:600; color:#756d68; margin-bottom:6px; }
.modern-orders .filter-select { border-radius:var(--pd-card-radius,12px) !important; background-color:#fff; font-size:14px !important; font-weight:500; }
.modern-orders .filter-select.is-filtered { border-color:var(--orders-accent) !important; background-color:#fff6f0; }
.modern-orders .item-segments { display:flex; padding:3px; border:1px solid var(--orders-border); border-radius:var(--pd-card-radius,12px); background:#f7f5f3; gap:3px; }
.modern-orders .item-segments button { flex:1; min-width:0; min-height:38px; padding:6px 8px; border:1px solid transparent; border-radius:9px; background:transparent; color:#756d68; box-shadow:none; font:inherit; font-size:13px; cursor:pointer; white-space:nowrap; }
.modern-orders .item-segments button[aria-pressed="true"] { background:#fff; border-color:var(--orders-border); color:#413835; font-weight:600; box-shadow:0 1px 3px #4138350c; }
.modern-orders .orders-results-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:36px; margin-bottom:12px; }
.modern-orders .orders-result-count { color:#756d68; font-size:13px; }
.modern-orders .orders-clear { border:0; background:transparent; color:#a93b11; padding:8px 0 8px 12px; min-height:44px; font:inherit; font-size:13px; font-weight:600; box-shadow:none; cursor:pointer; }
.modern-orders .orders-active-filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px; }
.modern-orders .orders-filter-chip { display:inline-flex; align-items:center; gap:8px; max-width:100%; min-height:36px; padding:6px 10px; border:1px solid #e8b8a5; border-radius:20px; background:#fff2eb; color:#a93b11; font:inherit; font-size:12px; box-shadow:none; cursor:pointer; }
.modern-orders .orders-filter-chip .chip-text { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.modern-orders :is(.item-segments button,.orders-clear,.orders-filter-chip):focus-visible { outline:2px solid var(--orders-accent); outline-offset:2px; }
@media(max-width:768px) { .modern-orders .orders-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } .modern-orders .filter-group:last-child { grid-column:1 / -1; } }
@media(max-width:359px) { .modern-orders .filter-select { font-size:13px !important; padding-left:10px !important; padding-right:30px !important; } }

/* v2.6: slightly smaller mobile Orders content. */
@media(max-width:768px) {
 .modern-orders .orders-search { margin-bottom:16px; }
 .modern-orders .orders-search input { min-height:44px; padding:9px 14px 9px 40px !important; line-height:1.3; }
 .modern-orders .orders-search::before { width:15px; height:15px; left:14px; }
 .modern-orders .filter-select { min-height:44px; padding-top:8px !important; padding-bottom:8px !important; font-size:13px !important; }
 .modern-orders .orders-filters { gap:10px; margin-bottom:12px; }
 .modern-orders .item-segments button { min-height:36px; font-size:12px; }
 .modern-orders .orders-results-bar { margin-bottom:8px; }
 .modern-orders .orders-active-filters { gap:6px; margin-bottom:12px; }
 .modern-orders .orders-filter-chip { min-height:32px; padding:5px 9px; }
 .modern-orders .orders-table .order-row { padding:14px; gap:10px 14px; margin-bottom:12px; }
 .modern-orders .orders-table td { font-size:13px; }
 .modern-orders .orders-table td::before { margin-bottom:3px; }
 .modern-orders .product-info { gap:10px; }
 .modern-orders .product-image { width:48px; height:48px; flex-basis:48px; }
 .modern-orders .product-name { font-size:13px; margin-bottom:5px; }
 .modern-orders :is(.product-variation,.qty-badge,.more-items) { font-size:11px; padding:3px 7px; }
 .modern-orders .status-badge { font-size:11px; padding:4px 9px; }
 .modern-orders .order-actions a { font-size:13px !important; }
 .modern-orders .empty-orders { padding:32px 18px; }
}
