/* =====================================================================
   Stock Mobile (31271) - app.css : big, touch friendly controls
   ===================================================================== */
body { -webkit-tap-highlight-color: transparent; }
.t-Button--large, .sm-big { min-height: 56px; font-size: 1.125rem; }
.t-Form-inputContainer input, .t-Form-inputContainer select, .t-Form-inputContainer textarea { font-size: 16px; } /* no iOS zoom */

/* home tiles */
.sm-tiles .t-Card-title { font-size: 1.125rem; }

/* stepper rows */
.sm-list { display: flex; flex-direction: column; gap: 8px; }
.sm-group { margin: 16px 0 4px; font-weight: 700; font-size: 1rem; color: var(--ut-body-text-color, #333); }
.sm-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px;
          background: var(--ut-component-background-color, #fff); border: 1px solid rgba(0,0,0,.12); flex-wrap: wrap; }
.sm-row.is-set { border-color: #2e7d32; background: #f1f8f1; }
.sm-row.is-diff { border-color: #e65100; background: #fff4e5; }
.sm-name { flex: 1 1 140px; font-size: 1.05rem; line-height: 1.3; text-align: left; background: none; border: 0; padding: 0; }
.sm-name small { display: block; color: #666; font-size: .8125rem; }
.sm-tap { cursor: pointer; min-height: 44px; }
.sm-step { display: flex; align-items: center; gap: 6px; }
.sm-step button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2);
                  font-size: 1.5rem; line-height: 1; background: #fff; }
.sm-step .sm-plus { background: #1f5c99; color: #fff; border-color: #1f5c99; }
.sm-qty { width: 72px; height: 48px; text-align: center; font-size: 1.25rem; border-radius: 8px; border: 1px solid rgba(0,0,0,.25); }
.sm-extra { flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sm-extra button { min-height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid rgba(0,0,0,.2); background: #fff; }
.sm-note { flex: 1 1 160px; height: 40px; border-radius: 8px; border: 1px solid rgba(0,0,0,.2); padding: 0 8px; font-size: 16px; }
.sm-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .75rem; background: #eee; margin-left: 4px; }
.sm-badge--urgent { background: #c62828; color: #fff; }
.sm-badge--ok { background: #2e7d32; color: #fff; }
.sm-badge--warn { background: #ef6c00; color: #fff; }

/* to-buy checklist */
.sm-check { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid rgba(0,0,0,.08); }
.sm-check input[type=checkbox] { width: 28px; height: 28px; flex: 0 0 28px; }
.sm-check.is-ticked .sm-name { text-decoration: line-through; color: #888; }

/* snap slip */
.sm-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sm-thumb { width: 96px; height: 128px; border-radius: 8px; background: #ddd center / cover no-repeat; position: relative; }
.sm-thumb-no { position: absolute; bottom: 4px; left: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; padding: 1px 6px; border-radius: 6px; }
.sm-photo { max-width: 100%; border-radius: 8px; margin-bottom: 8px; }

/* home: compact 2-column tiles so every action fits on one phone screen */
.sm-tiles .t-Cards { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.sm-tiles .t-Cards-item { width: auto !important; margin: 0 !important; padding: 0 !important; }
.sm-tiles .t-Card { height: 100%; margin: 0; }
.sm-tiles .t-Card-wrap { padding: 12px 8px; min-height: 0; }
.sm-tiles .t-Card-icon { margin: 0 auto 6px; }
.sm-tiles .t-Card-icon .t-Icon { width: 48px; height: 48px; line-height: 48px; font-size: 22px; }
.sm-tiles .t-Card-titleWrap { padding: 0; text-align: center; }
.sm-tiles .t-Card-title { font-size: 1rem; margin: 0; }
.sm-tiles .t-Card-body { padding: 4px 0 0; text-align: center; min-height: 0; }
.sm-tiles .t-Card-desc { font-size: .8125rem; color: #666; }
.sm-tiles .t-Card-info { display: none; }

/* tighter item rows on Quick Use / Count / Recipes */
.sm-row { padding: 8px 10px; }
.sm-step button { width: 44px; height: 44px; }
.sm-qty { width: 60px; height: 44px; }

/* name and stepper on one line on a phone */
.sm-name { flex: 1 1 90px; min-width: 0; }
.sm-step { flex: 0 0 auto; }

/* the Save / Finalise bar stays in view while scrolling long lists - only regions that are just a button bar
   (not a form with a big button, like Ask Stock or Snap Slip) */
.t-Body-content .t-Region:has(.t-Button--hot.t-Button--stretch):not(:has(.t-Form-fieldContainer, .sm-list, .sm-row, p)) {
  position: sticky; bottom: 0; z-index: 20;
  box-shadow: 0 -2px 10px rgba(0,0,0,.12);
}

.sm-empty { color: #666; margin: 4px 0; }

/* Ask Stock: small result table that scrolls sideways on a phone */
.sm-table { overflow-x: auto; margin-top: 12px; }
.sm-table table { border-collapse: collapse; font-size: .8125rem; min-width: 100%; }
.sm-table th, .sm-table td { border-bottom: 1px solid rgba(0,0,0,.1); padding: 6px 8px; text-align: left; white-space: nowrap; }
.sm-table th { background: #f3f3f3; }

/* text areas use the full width on a phone */
.t-Form-inputContainer textarea, .t-Form-itemWrapper textarea { width: 100%; }

/* bell: unread count as a clear red badge (was tiny and dark-on-dark) */
.t-NavigationBar-item .t-Button-badge, .t-NavigationBar .t-Button-badge {
  background: #c62828 !important; color: #fff !important; border-radius: 10px;
  min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; font-size: 11px; font-weight: 700;
  box-shadow: 0 0 0 2px #2b2b2b;
}

/* Recipes: cost line above the ingredients */
.sm-cost { padding: 10px 12px; margin-bottom: 10px; border-radius: 8px; background: var(--ut-palette-info-shade, #eef4fb); font-size: 1.05rem; line-height: 1.4; }
.sm-cost small { color: var(--ut-component-text-muted-color, #666); }

/* textareas use the full width (Check Delivery note ...): the textarea's group wrapper does not stretch by itself */
.t-Form-itemWrapper > .apex-item-group--textarea { flex: 1 1 auto; width: 100%; }
.apex-item-group--textarea textarea { width: 100%; }
/* My Slips: a gap between the list and the Snap button */
#my-slips { margin-bottom: 12px; }
/* Check Delivery: All / Deliveries / Transfers as one bar of equal buttons */
.t-Form-fieldContainer--radioButtonGroup .apex-item-radio { display: flex; width: 100%; }
.t-Form-fieldContainer--radioButtonGroup .apex-item-radio .apex-item-option { flex: 1; }
.t-Form-fieldContainer--radioButtonGroup .apex-item-radio label { width: 100%; text-align: center; }

/* search boxes (Find product, Event ...) use the full width */
.t-Form-itemWrapper > .apex-item-group--popup-lov { flex: 1 1 auto; width: 100%; }
.apex-item-group--popup-lov .apex-item-popup-lov { width: 100%; }
/* Quick Use: filter box above a long list */
.sm-filter { width: 100%; font-size: 16px; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--ut-field-border-color, #c8c8c8); border-radius: 8px; }

/* the same gap between every region / button bar on every page (they otherwise touch on the phone) */
.t-Body-contentInner .t-Region,
.t-Body-contentInner .t-ButtonRegion { margin-bottom: 12px; }
.t-Body-contentInner .t-Region .t-Region { margin-bottom: 8px; }   /* regions inside a region: a little less */
