/* Tinny Mart Pre-Order compact, mobile-first form refinements */
#formPage, #formPage * { box-sizing: border-box; }
#formPage .layout, #formPage .layout > *, #formPage section, #formPage .grid, #formPage .grid > div,
#formPage .item, #formPage .sticky, #formPage .tm-po-select-wrap { min-width: 0; max-width: 100%; }
#formPage label { font-size: 13px !important; line-height: 1.3 !important; margin: 8px 0 4px !important; }
#formPage input:not([type=hidden]), #formPage textarea, #formPage select,
#formPage .tm-po-select-trigger {
  width: 100% !important; max-width: 100% !important; min-width: 0 !important;
  min-height: 32px !important; height: 32px !important; padding: 5px 10px !important;
  font-size: 16px !important; line-height: 1.25 !important; border-radius: 8px !important;
}
#formPage textarea { height: 58px !important; min-height: 58px !important; resize: vertical; }
#formPage input:focus, #formPage textarea:focus, #formPage .tm-po-select-trigger:focus-visible {
  outline: 2px solid rgba(200,77,132,.24) !important; outline-offset: 1px;
}
#formPage .grid { gap: 8px !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
#formPage .stepper { min-width: 0; height: 32px; }
#formPage .stepper button { min-width: 30px !important; min-height: 30px !important; height: 30px !important; padding: 2px 6px !important; }
#formPage .stepper input { min-height: 30px !important; height: 30px !important; padding: 2px !important; font-size: 16px !important; }
#formPage section { overflow: visible; }
#formPage .item { overflow: hidden; padding: 10px !important; margin-bottom: 10px !important; }
#formPage .tm-po-advance-row { display:flex; align-items:center; gap:10px; margin:8px 0; flex-wrap:nowrap; }
#formPage .tm-po-advance-row label { flex:1 1 auto; min-width:0; margin:0 !important; color:#202124 !important; font-size:14px !important; font-weight:400 !important; }
#formPage .tm-po-advance-row input { flex:0 1 132px; width:132px !important; min-width:92px !important; max-width:42% !important; margin:0 !important; text-align:right; color:#202124 !important; background:#fff !important; border:1px solid #d0d5dd !important; }
#formPage .tm-po-due-line { padding-top:9px; border-top:1px solid #eadce3; }
#formPage .tm-po-due-line strong { color:#a93669; }
#formPage .tm-po-select-wrap { position:relative; width:100%; }
#formPage select.tm-po-native-select { position:absolute !important; width:1px !important; height:1px !important; min-height:1px !important; opacity:0 !important; pointer-events:none !important; padding:0 !important; border:0 !important; }
#formPage .tm-po-select-trigger { display:flex !important; align-items:center; justify-content:space-between; gap:12px; text-align:left; color:#30313a !important; background:#fff !important; border:1px solid #e1e3e7 !important; font-weight:500 !important; box-shadow:none !important; cursor:pointer; }
#formPage .tm-po-chevron { flex:0 0 auto; color:#a93669; font-size:19px; line-height:1; transition:transform .18s ease; }
#formPage .tm-po-select-trigger[aria-expanded=true] .tm-po-chevron { transform:rotate(180deg); }
#formPage .tm-po-select-menu { position:absolute; z-index:1000; top:calc(100% + 5px); left:0; right:0; display:grid; gap:3px; padding:5px; background:#fff; border:1px solid #ead5df; border-radius:11px; box-shadow:0 12px 30px rgba(70,25,48,.15); opacity:0; visibility:hidden; transform:translateY(-5px); transition:opacity .16s ease, transform .16s ease, visibility .16s; }
#formPage .tm-po-select-menu.open { opacity:1; visibility:visible; transform:translateY(0); }
#formPage .tm-po-select-option { display:block; width:100%; min-height:36px !important; height:auto !important; padding:8px 10px !important; border-radius:7px !important; background:#fff !important; color:#34313a !important; text-align:left; font-size:14px !important; font-weight:500 !important; }
#formPage .tm-po-select-option.selected { background:#fff0f6 !important; color:#a93669 !important; font-weight:750 !important; }
#formPage #save { position:static !important; inset:auto !important; width:100% !important; max-width:none !important; min-height:40px !important; height:auto !important; margin:12px 0 0 !important; padding:10px 14px !important; box-shadow:none !important; }
@media (max-width:799px) {
  html, body { width:100%; max-width:100%; overflow-x:hidden; }
  body { padding-bottom:0 !important; }
  main { width:100% !important; max-width:100% !important; margin:0 auto !important; padding:12px 12px 22px !important; }
  #formPage { width:100%; max-width:100%; }
  #formPage .layout { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:12px !important; }
  #formPage .layout > div, #formPage .layout > section { width:100% !important; min-width:0 !important; }
  #formPage section { width:100% !important; margin:0 0 12px !important; padding:12px !important; border-radius:12px !important; }
  #formPage .sticky { position:static !important; top:auto !important; }
  #formPage .grid { gap:7px !important; }
  #formPage .tm-po-select-menu { max-height:220px; overflow-y:auto; }
}
@media (max-width:360px) {
  #formPage .grid { grid-template-columns:minmax(0,1fr) !important; }
}

/* Payment summary refinement: Advance above Total, neutral text, bold Due only */
#formPage .tm-po-summary-divider { border:0; border-top:1px solid #d9dde3; margin:10px 0; }
#formPage .tm-po-summary-row,
#formPage .tm-po-summary-row strong,
#formPage .tm-po-advance-row label,
#formPage .tm-po-advance-row input,
#formPage .tm-po-due-line,
#formPage .tm-po-due-line strong,
#formPage .tm-po-due-line span { color:#202124 !important; }
#formPage .tm-po-summary-row { font-weight:400; }
#formPage .tm-po-summary-row strong { font-weight:500; }
#formPage .tm-po-due-line { border-top:0 !important; padding-top:2px !important; font-weight:800 !important; }
#formPage .tm-po-due-line strong { font-weight:800 !important; font-size:16px !important; }
#formPage .tm-po-due-line span { font-weight:500 !important; font-size:16px !important; }

/* Advance stays in the same payment-summary position, as a compact amount row. */
@media(max-width:799px){
  #formPage .tm-po-advance-row input{flex-basis:118px;width:118px!important;max-width:44%!important;min-width:88px!important;}
}
