/* Tablet and touch fixes (iPad first). Loaded last so it wins over clean.css.
   Desktop mouse use is unchanged except for the page-actions overlap fix. */

/* Page buttons sit beside the title only where there is room; elsewhere they drop below it
   instead of covering the description (clean.css pulls them up by 52px). */
@media (max-width:1200px){
 body .page-content .page-actions{margin-top:0;justify-content:flex-start;margin-bottom:18px}
}
.report-heading-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:flex-end}
@media (max-width:580px){.report-heading-actions{margin-top:17px;justify-content:flex-start}}

/* Tablet filter bars: each label sits above its field in an even grid, instead of squeezing beside it. */
@media (min-width:701px) and (max-width:1200px){
 body .page-content form.filter-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;align-items:end}
 body .page-content form.filter-row .catalog-filter-options:not([hidden]){display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;grid-column:1/-1}
 body .page-content form.filter-row label{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0;min-width:0;max-width:none}
 body .page-content form.filter-row label :is(input,select){width:100%;max-width:none}
}

@media (pointer:coarse){
 /* 16px stops iPad Safari zooming the page when a field is tapped. */
 input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{font-size:16px!important}

 /* Tap targets of at least 44px (Apple's guideline). */
 /* !important: table and toolbar styles elsewhere fix these controls at 30–34px. */
 .page-content :is(.btn,.table-action,.icon-button,select,summary),.topbar :is(.icon-button,.person-menu),.page-content button:not(.sp-option):not([role=tab]){min-height:44px!important}
 .page-content .table-action{display:inline-flex!important;align-items:center;padding-inline:12px!important}
 .page-content .inv-link-btn{display:inline-flex;align-items:center;min-height:44px;padding-inline:6px}
 input[type=checkbox],input[type=radio]{width:22px;height:22px;min-width:22px}

 /* Stand-alone text links get a taller hit area without changing how they look. */
 .simple-heading>a:not(.btn),.signin-forgot,a[href*="page=password"]:not(.btn),.page-content td a:not(.btn):not(.table-action){display:inline-flex;align-items:center;min-height:40px}

 /* Swiping scrolls wide tables, so the floating desktop scrollbar only covers rows. */
 .product-row-scroll{display:none!important}

 /* No sticky hover effects after a tap. */
 .btn:hover,.overview-counter:hover .ov-icon{transform:none}

 /* Less accidental zoom on double-tap; faster taps. */
 a,button,summary,label,input,select,textarea{touch-action:manipulation}
}
