/* Shared sizing for transaction screens; the POS remains full-screen. */
.pos-heading h1, .new-product-header h1 { font-size: 20px; line-height: 1.4; }
.pos-heading p, .new-product-header p, .new-product-heading p, .new-product-form small { font-size: 13px; line-height: 1.7; }
.pos-products-heading p, .pos-cart-heading p, .pos-dialog-intro, .pos-review-line, .pos-option-row label, .pos-customer, .pos-bankak-fields label { font-size: 13px; line-height: 1.6; }
.pos-option-row select, .pos-option-row input, .pos-bankak-fields input:not([type=file]), .pos-customer-create input { min-height: 44px; font-size: 14px; }
.pos-back, .pos-customer { min-height: 44px; }.pos-header { min-height: 66px; height: auto; padding-block: 10px; }
.new-product-form label, .new-product-form input, .new-product-form select, .new-product-form textarea { font-size: 14px; }.new-product-form input, .new-product-form select { min-height: 46px; }.new-product-body { border-radius: 12px; }.new-product-grid { gap: 20px 24px; }
@media(max-width:760px){.pos-header{padding-inline:16px}.new-product-header{min-height:68px;height:auto;padding-block:10px}}
@media (max-width:650px) { .pos-brand { display:none; }.pos-header { justify-content:space-between; gap:8px; }.pos-heading { min-width:0; gap:8px; }.pos-heading > div { min-width:0; }.pos-heading p { overflow-wrap:anywhere; } }

/* POS cashier sizing: readable at arm's length, 44px touch targets, payment details next to the total. */
.pos-products .pos-search { height: 52px; }
.pos-products .pos-search input { height: 50px; font-size: 15px; }
.pos-categories { display: flex; gap: 8px; overflow-x: auto; padding: 12px 1px 2px; scrollbar-width: thin; }
.pos-categories[hidden] { display: none; }
.pos-category { flex: none; min-height: 44px; padding: 0 16px; border: 1px solid #d6e1e7; border-radius: 22px; background: #fff; color: #3f5c6e; font: inherit; font-size: 14px; white-space: nowrap; }
.pos-category[aria-pressed="true"] { background: #087e91; border-color: #087e91; color: #fff; font-weight: 700; }
.pos-list-header { margin: 12px 1px 10px; justify-content: flex-end; }
.pos-list-header span { font-size: 12px; }
.pos-catalog-state { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pos-catalog-message { font-size: 14px; line-height: 1.7; }
.pos-catalog-state .outline-button { min-height: 44px; margin-bottom: 10px; }
.pos-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.pos-product { padding: 12px; gap: 10px; min-height: 104px; }
.pos-product.no-image .pos-product-image { display: none; }
.pos-product-name { font-size: 14px; min-height: 0; }
.pos-product-price { font-size: 15px; }
.pos-product-stock { font-size: 12px; }
.pos-product-add { width: 36px; height: 36px; font-size: 22px; flex: none; }

.pos-cart-heading { padding: 14px 18px 10px; }
.pos-clear { min-height: 44px; padding: 0 12px; font-size: 13px; border-radius: 7px; }
.pos-clear:disabled { opacity: .45; }
.pos-cart-items { min-height: 96px; border-top: 1px solid #edf2f5; }
.pos-line { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 18px; }
.pos-line-name { font-size: 14px; }
.pos-line-price { font-size: 12px; }
.pos-line-total { font-size: 15px; align-self: start; }
.pos-line-controls { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pos-quantity { height: 46px; border-radius: 8px; }
.pos-quantity button { width: 44px; height: 44px; font-size: 22px; }
.pos-quantity input { width: 56px; height: 44px; font-size: 15px; font-weight: 700; }
.pos-remove { margin: 0; min-height: 44px; padding: 0 14px; border: 1px solid #efd6d2; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 500; }
.pos-remove:disabled, .pos-quantity button:disabled { opacity: .5; }
.pos-empty { font-size: 14px; }
.pos-empty span { font-size: 12px; }
.pos-undo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 18px 10px; padding-block: 6px; padding-inline: 12px 6px; background: #102235; color: #fff; border-radius: 8px; font-size: 13px; }
.pos-undo[hidden] { display: none; }
.pos-undo button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 6px; background: #ffffff1f; color: #fff; font: inherit; font-weight: 700; }

.pos-sale-options { padding: 12px 18px; border-top: 1px solid #edf2f5; border-bottom: 0; gap: 10px; }
.pos-payment-row { display: grid; gap: 6px; }
.pos-option-label { color: #647f8e; font-size: 13px; }
.pos-payment-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pos-payment-buttons button { min-height: 44px; border: 1px solid #d6e1e7; border-radius: 8px; background: #fff; color: #3f5c6e; font: inherit; font-size: 14px; }
.pos-payment-buttons button[aria-pressed="true"] { background: #e8f5f6; border-color: #087e91; color: #087e91; font-weight: 700; }
.pos-payment-buttons button:disabled, .pos-discount-toggle:disabled { opacity: .55; }
.pos-discount-row { display: grid; gap: 8px; }
.pos-discount-row[hidden], .pos-discount-controls[hidden] { display: none; }
.pos-discount-toggle { min-height: 44px; display: flex; align-items: center; gap: 9px; width: 100%; padding: 0 11px; background: #f9fbfc; border: 1px solid #dce7ec; border-radius: 7px; color: #647f8e; font: inherit; font-size: 13px; text-align: right; }
.pos-discount-toggle strong { flex: 1; color: #8395a1; font-weight: 400; font-size: 14px; }
.pos-discount-toggle.is-set strong { color: #102235; font-weight: 700; }
.pos-discount-controls { gap: 8px; }
.pos-discount-controls select, .pos-discount-controls input { min-height: 44px; height: 44px; border: 1px solid #dce7ec; border-radius: 6px; background: #fff; color: #102235; font: inherit; font-size: 14px; padding: 0 9px; }
.pos-discount-controls select { width: 110px; }
.pos-discount-controls input { flex: 1; min-width: 0; width: auto; text-align: left; }

.pos-summary { padding: 12px 18px 16px; }
.pos-summary-row { font-size: 13px; margin-bottom: 8px; }
.pos-summary-row strong { color: #102235; font-weight: 500; }
.pos-summary-row[hidden] { display: none; }
#pos-discount-amount { color: #b84c42; }
.pos-total { padding: 12px 14px; }
.pos-total span { font-size: 15px; }
.pos-total small { font-size: 11px; }
.pos-total strong { font-size: 30px; line-height: 1.2; }
.pos-cart-message { font-size: 13px; }
.pos-checkout { height: 56px; margin-top: 12px; font-size: 17px; }
.pos-cancel-saved { min-height: 44px; font-size: 14px; }
@media (max-height: 760px) and (min-width: 761px) { .pos-total strong { font-size: 26px; } .pos-checkout { height: 52px; } }
.pos-success { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 18px 12px; padding-block: 6px; padding-inline: 14px 6px; border-radius: 8px; background: #e5f5ee; color: #1f6b4a; font-size: 14px; font-weight: 600; line-height: 1.7; }
.pos-success[hidden] { display: none; }
.pos-success button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: #1f6b4a; font-size: 22px; }

/* POS customer: phone first. The full number finds the customer or creates one. */
.pos-customer-phone { display: flex; gap: 8px; }
.pos-customer-phone[hidden], .pos-customer-selected[hidden] { display: none; }
.pos-customer-phone input { flex: 1; min-width: 0; min-height: 44px; padding: 0 11px; border: 1px solid #dce7ec; border-radius: 7px; background: #fff; color: #102235; font: inherit; font-size: 14px; text-align: left; }
.pos-customer-phone input::placeholder { font-size: 12px; text-align: right; direction: rtl; }
.pos-customer-phone input:focus { outline: 0; border-color: #087e91; box-shadow: 0 0 0 3px #087e911a; }
.pos-customer-phone button { min-height: 44px; padding: 0 14px; border-radius: 7px; font: inherit; font-size: 14px; white-space: nowrap; }
#pos-customer-find { border: 0; background: #087e91; color: #fff; font-weight: 700; }
.pos-customer-list { border: 1px solid #dce7ec; background: #f9fbfc; color: #3f5c6e; }
.pos-customer-phone button:disabled { opacity: .55; }
.pos-customer-selected { display: flex; align-items: center; gap: 9px; min-height: 44px; padding-inline: 11px 4px; background: #e8f5f6; border: 1px solid #b9dde2; border-radius: 7px; font-size: 13px; color: #647f8e; }
.pos-customer-selected strong { color: #102235; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-customer-selected small { flex: 1; color: #647f8e; font-size: 12px; text-align: right; white-space: nowrap; }
.pos-customer-selected button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: #b84c42; font: inherit; font-size: 13px; }

/* The invoice panel never grows wider than its column: long customer names wrap or truncate instead of
   pushing the payment buttons out of view on small screens. */
.pos-sale-options { grid-template-columns: minmax(0, 1fr); }
.pos-sale-options > * { min-width: 0; }
.pos-customer-selected { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 9px; padding-block: 6px; }
.pos-customer-selected strong { min-width: 0; }
.pos-customer-selected button { grid-column: 3; grid-row: 1 / span 2; min-height: 44px; padding: 0 12px; border: 1px solid #b9dde2; background: #fff; color: #087e91; font-weight: 700; white-space: nowrap; }
.pos-customer-meta { grid-column: 1 / 3; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.pos-customer-meta:has(small:empty + small:empty) { display: none; }
.pos-customer-selected .pos-customer-meta small { flex: none; text-align: right; }
.pos-customer-selected .pos-customer-meta small:empty { display: none; }
.pos-payment-buttons button { min-width: 0; padding-inline: 4px; }
.pos-customer-phone { flex-wrap: wrap; }
.pos-customer-phone input { flex: 1 1 160px; }

.pos-success .pos-success-print { width: auto; min-height: 44px; padding: 0 12px; border: 1px solid #9fd3bb; background: #fff; font: inherit; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.pos-success .pos-success-print[hidden] { display: none; }
