/* Sales & money screens. Builds on labwolf-os.css and xtazy.css; everything here is prefixed sa-. */
.sa [hidden] { display: none !important; }
.sa .button, .sa-form .button { min-height: 40px; }
.sa-big { width: 100%; min-height: 48px !important; font-size: 14px !important; }
.sa-back { margin: 0 0 10px; font-size: 13px; }
.sa-back a { color: #5f605b; }
.sa-muted { color: #656b60; font-size: 13px; margin: 6px 0; }
.sa-error { color: var(--xz-bad); font-size: 13px; margin: 0; line-height: 1.5; }
.sa-error:empty { display: none; }
.sa-num { text-align: right; }
.sa-clip { display: block; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sa-stack { display: grid; gap: 14px; }
.sa-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.sa-plain { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 8px; }
.sa-plain legend { font-size: 13px; color: #40413e; padding: 0; margin-bottom: 6px; }
.sa legend small, .sa label small, .sa-form small { color: #656b60; font-weight: 400; }
.sa label, .sa-form label { display: grid; gap: 6px; font-size: 13px; color: #40413e; }
.sa label.woo-toggle, .sa-form label.woo-toggle { display: flex; min-height: 40px; align-items: center; }
.sa input:not([type=checkbox]):not([type=radio]), .sa select, .sa textarea,
.sa-form input:not([type=checkbox]):not([type=radio]), .sa-form select { min-height: 42px; font-size: 15px; width: 100%; }
.sa input[type=checkbox], .sa input[type=radio], .sa-form input[type=checkbox], .sa-form input[type=radio] { width: 20px; height: 20px; flex: none; }
.sa-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.sa-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
.sa-narrow { max-width: 260px; }
.sa-notice { justify-content: space-between; flex-wrap: wrap; }
.sa-notice > a { display: inline-flex !important; font-size: 12px !important; }
.sa-warn { background: #fdf0d8; border-color: #f3dcae; color: #6b4000; }

/* list */
.sa-range { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0 0 16px; }
.sa-range label { width: 170px; }
.sa .os-table-workspace td small { display: block; margin-top: 3px; }
.sa .os-table-workspace .sa-hide { display: none; }

/* ring up */
.sa-search { position: relative; }
.sa-results ul { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--os-line, #e1e4dc); border-radius: 10px; overflow: hidden; }
.sa-results li + li { border-top: 1px solid var(--os-line, #e1e4dc); }
.sa-results button { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: center; width: 100%; min-height: 48px; padding: 8px 12px; cursor: pointer; font-size: 14px; }
.sa-results button:hover, .sa-results button:focus-visible { background: #f6f7f3; outline: 2px solid #2563eb; outline-offset: -2px; }
.sa-results button > span { display: grid; flex: 1; min-width: 0; }
.sa-results small { color: #656b60; font-size: 12px; }
.sa-results em { font-style: normal; font-weight: 600; white-space: nowrap; }
.sa-results img, .sa-noimg, .sa-line-name img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; background: #f4f3f1; flex: none; }
.sa-picked { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--os-line, #e1e4dc); border-radius: 10px; background: #fafaf7; }
.sa-picked > div { display: grid; min-width: 0; }
.sa-picked small { color: #656b60; font-size: 12px; overflow-wrap: anywhere; }
.sa-walkin { display: inline-flex; gap: 6px; align-items: center; }
.sa-walkin small { color: #656b60; font-size: 12px; }

.sa-lines { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.sa-lines li { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--os-line, #e1e4dc); border-radius: 10px; }
.sa-line-name { display: flex; gap: 10px; align-items: center; min-height: 42px; }
.sa-line-name span { display: grid; min-width: 0; }
.sa-line-name strong { font-size: 14px; overflow-wrap: anywhere; }
.sa-line-name small, .sa-line-note { color: #656b60; font-size: 12px; }
.sa-line-note { grid-column: 1 / -1; }
.sa-price span { font-size: 12px; }
.sa-taxed { font-size: 12px; color: #656b60; min-height: 42px; display: inline-flex; align-items: center; }
.sa-tax-toggle { min-height: 42px; }

.sa-finish { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--os-line, #e1e4dc); display: grid; gap: 14px; }
.sa-finish h3 { margin: 0; font-size: 14px; }
.sa-finish-fields { display: grid; gap: 12px; }
.sa-choices { display: grid; gap: 8px; }
.sa .sa-choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--os-line, #e1e4dc); border-radius: 10px; cursor: pointer; }
.sa .sa-choice:has(input:checked) { border-color: #2563eb; background: #f1f5ff; }
.sa-choice input { margin-top: 2px; }
.sa-choice span { display: grid; gap: 2px; }
.sa-choice strong { font-size: 14px; }
.sa-choice small { font-size: 12px; line-height: 1.5; }
.sa-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 1px solid var(--os-line, #e1e4dc); border-radius: 10px; max-height: 260px; overflow: auto; }
.sa-plan li { display: flex; justify-content: space-between; padding: 9px 12px; font-size: 13px; }
.sa-plan li + li { border-top: 1px solid var(--os-line, #e1e4dc); }

.sa-pay { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 0; border-bottom: 1px solid var(--os-line, #e1e4dc); }
.sa-pay > label { flex: 1 1 140px; min-width: 0; }
.sa-pay > label > select, .sa-pay > label > input { width: 100%; }
.sa-pay:first-child { padding-top: 0; }
.sa-dim { opacity: .7; }

.sa-sticky { position: sticky; top: 16px; }
.sa-sum { margin: 0 0 16px; display: grid; gap: 0; font-size: 14px; }
.sa-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.sa-sum dt { color: #5f605b; }
.sa-sum dd { margin: 0; white-space: nowrap; }
.sa-sum .sa-total { border-top: 1px solid #111210; margin-top: 4px; padding-top: 10px; font-size: 18px; font-weight: 650; }
.sa-sum .sa-total dt { color: #111210; }
.sa-sum .sa-owed { font-weight: 650; color: var(--xz-warn); }
.sa-sum .sa-over { font-weight: 650; color: var(--xz-bad); }
.sa-sticky .sa-error { margin-bottom: 12px; }

/* sale page */
.sa-status { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: -12px 0 20px; font-size: 13px; color: #40413e; }
.sa-status strong { font-size: 15px; color: var(--xz-warn); }
.sa-items, .sa-pays, .sa-sched { list-style: none; margin: 0 0 12px; padding: 0; }
.sa-items li, .sa-pays li, .sa-sched li { display: flex; gap: 10px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--os-line, #e1e4dc); font-size: 14px; flex-wrap: wrap; }
.sa-items li > span, .sa-pays li > span:first-child, .sa-sched li > span:first-child { display: grid; gap: 3px; flex: 1 1 200px; min-width: 0; }
.sa-items small, .sa-pays small, .sa-sched small { color: #656b60; font-size: 12px; overflow-wrap: anywhere; }
.sa-items em, .sa-pays em, .sa-sched em { font-style: normal; font-weight: 600; white-space: nowrap; margin-left: auto; }
.sa-items .xz-pill, .sa-pays .xz-pill { justify-self: start; }
.sa-voided strong, .sa-voided em { text-decoration: line-through; color: #8a8d85; }
.sa-btns { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.sa-sale .xz-dl dd { overflow-wrap: anywhere; }

/* reports */
.sa-range-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.sa-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.sa-table { overflow-x: auto; }
.sa-table table { white-space: normal; }
.sa-table th, .sa-table td { padding: 10px 12px; }
.sa-table td small { display: block; }
.sa-table tfoot th { background: #f8f8f6; color: #111210; font-size: 12px; }

@media (max-width: 1100px) { .sa-report-grid { grid-template-columns: 1fr; } }
@media (max-width: 1000px) { .sa-sticky { position: static; } }
@media (max-width: 700px) {
  .sa-grid2, .sa-grid3 { grid-template-columns: 1fr; }
  .sa-lines li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sa-lines .sa-line-main { grid-column: 1 / -1; }
  .sa-lines .sa-remove { grid-column: 1 / -1; justify-self: start; }
  .sa-pay > label:nth-child(3) { flex-basis: 100%; }
  .sa-pay .sa-remove { justify-self: start; }
  .sa-range label { width: calc(50% - 5px); }
  .sa-range .button { flex: 1 1 auto; }
  .sa .os-table-workspace .sa-hide-sm { display: none; }
  .sa-clip { max-width: 200px; }
  .sa-range-pick .button { flex: 1 1 calc(50% - 8px); }
  .sa-table th, .sa-table td { padding: 8px 6px; font-size: 12px; }
  .sa .insight-kpis strong { font-size: 21px; }
}
@media (max-width: 700px) { .sa .os-table-scroll table { min-width: 0; } .sa .os-table-scroll td, .sa .os-table-scroll th { padding-inline: 10px; } }

/* compact list cells */
.sa .os-table-scroll td.sa-nowrap { white-space: nowrap; }
.sa .sa-show-sm { display: none; }
.sa-report-grid + .panel .button, .sa .page-heading .button { white-space: normal; text-align: center; }
.sa .sa-row-actions .button { white-space: normal; text-align: center; }

/* ring up: total bar pinned to the bottom of a phone screen */
.sa-bar { display: none; }
@media (max-width: 1000px) {
  .sa-new { padding-bottom: 76px; }
  .sa-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; gap: 12px; align-items: center; justify-content: space-between;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--os-line, #e1e4dc); box-shadow: 0 -6px 20px #0000000f; }
  .sa-bar span { display: grid; min-width: 0; }
  .sa-bar small { font-size: 11px; color: #656b60; }
  .sa-bar strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sa-bar .button { min-height: 46px; padding-inline: 18px; font-size: 14px; flex: none; }
}
@media (max-width: 700px) {
  .sa .sa-show-sm { display: block; font-weight: 600; color: #111210; }
  .sa .sa-clip { max-width: 150px; }
}
