/* Shared dialog palette. Never override these colors in a page or Swal options. */
.app-dialog {
  --swal2-background: #fff;
  --swal2-color: var(--food-green);
  --swal2-border-radius: 1rem;
  --swal2-outline: 0 0 0 3px rgb(22 61 50 / 25%);
  font-family: inherit;
}
.app-dialog .swal2-title { font-size: 1.5rem; }
.app-dialog .swal2-html-container { color: var(--bs-body-color); overflow-wrap: anywhere; white-space: pre-line; }
.app-dialog .swal2-actions { padding: 0 1rem; }
.app-dialog .swal2-actions .btn { --bs-btn-focus-shadow-rgb: 22, 61, 50; min-width: 7rem; margin: 0; }
.app-dialog .swal2-icon.swal2-success,
.app-dialog .swal2-icon.swal2-info,
.app-dialog .swal2-icon.swal2-question {
  color: var(--food-green);
  border-color: var(--food-green);
}
.app-dialog .swal2-icon.swal2-warning,
.app-dialog .swal2-icon.swal2-error {
  color: var(--food-orange);
  border-color: var(--food-orange);
}
.app-dialog .swal2-success .swal2-success-ring { border-color: rgb(22 61 50 / 25%); }
.app-dialog .swal2-success [class^='swal2-success-line'] { background-color: var(--food-green); }
.app-dialog .swal2-error [class^='swal2-x-mark-line'] { background-color: var(--food-orange); }
.notification-fallback { border-left: .25rem solid var(--food-orange); }

.app-dialog-catalog { width: min(56rem, calc(100% - 1rem)); }
.app-dialog-catalog .swal2-html-container { white-space: normal; font-size: 1rem; }
.app-dialog-catalog .catalog-results { max-height: 52vh; overflow-y: auto; overflow-x: hidden; padding: .25rem; }

.app-dialog-region { width: min(38rem, calc(100% - 1rem)); }
.app-dialog-region .swal2-html-container { white-space: normal; font-size: 1rem; text-align: left; }

.app-dialog-crop { width:min(880px, calc(100% - 2rem)); }

/* Shared product selection dialog: the premium reference uses the real cart contract. */
.app-dialog-product-backdrop{--swal2-backdrop:#0a1e17a3;background:#0a1e17a3;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.app-dialog-product{display:flex!important;flex-direction:column;width:min(495px,calc(100vw - 30px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #dfe6dd;border-radius:23px;overflow-y:auto;overscroll-behavior:contain;box-shadow:0 24px 110px #0b201938}
.app-dialog-product .swal2-title{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.app-dialog-product .swal2-html-container{flex-shrink:0;margin:0;padding:0 27px;text-align:left;white-space:normal;overflow:visible;font-size:14px}
.app-dialog-product .product-dialog-image{display:block;width:calc(100% + 54px);height:238px;margin:0 -27px;object-fit:contain;padding:12px;background:#fff}
.app-dialog-product .product-dialog-image[hidden]{display:none}
.app-dialog-product .product-dialog-heading{font-size:25px;font-weight:800;letter-spacing:-.8px;line-height:1.3;min-height:48px;display:flex;align-items:center;margin:20px 0 13px;padding-right:62px;overflow-wrap:anywhere;color:var(--food-green)}
.app-dialog-product .product-dialog-description{color:#718164;line-height:1.7;margin:0 0 20px;white-space:pre-line}
.app-dialog-product .swal2-close{position:absolute;top:20px;right:27px;width:48px;height:48px;margin:0;border:1px solid #e3e9e2;border-radius:50%;background:#fff;color:var(--food-green);font-size:30px;box-shadow:none}
.app-dialog-product:has(.product-dialog-image:not([hidden])) .swal2-close{top:258px}
.app-dialog-product .product-option-group{margin:20px 0;border:0;padding:0;min-width:0}
.app-dialog-product .product-option-title{float:none;width:auto;font-size:16px;font-weight:800;margin:0 0 6px;color:var(--food-green)}
.app-dialog-product .product-option-help{font-size:12px;line-height:1.7;color:#718164;margin:0 0 12px}
.app-dialog-product .product-option{display:flex;align-items:center;gap:12px;border-radius:12px;padding:13px;margin:8px 0;min-height:52px}
.app-dialog-product .product-option-name{min-width:0;flex:1;overflow-wrap:anywhere}
.app-dialog-product .product-option-price{font-size:13px;text-align:right;flex-shrink:0;max-width:45%;overflow-wrap:anywhere}
.app-dialog-product .product-option-price del{display:block;color:#718164;font-size:11px;font-weight:400}
.app-dialog-product .product-dialog-pricing{width:100%;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:18px;margin:18px 0 14px}
.app-dialog-product .product-dialog-prices{display:flex;flex:1;flex-wrap:wrap;align-items:baseline;gap:8px;min-width:0;margin:0;color:var(--food-green)}
.app-dialog-product .product-dialog-prices strong{font-size:23px;font-weight:800;overflow-wrap:anywhere}
.app-dialog-product .product-dialog-prices del{font-size:12px;color:#718164}
.app-dialog-product .product-dialog-prices del[hidden]{display:none}
.app-dialog-product .product-dialog-quantity{flex:0 0 160px}
.app-dialog-product .quantity-control,[data-customer-cart] .quantity-control{display:flex;flex-wrap:nowrap;gap:5px;border:1px solid #dfe8d7;border-radius:10px;padding:5px;max-width:none}
.app-dialog-product .quantity-control>.btn,[data-customer-cart] .quantity-control>.btn{flex:0 0 48px;width:48px;height:48px;min-width:0;border:0;border-radius:6px!important;background:#f1f5ea;color:var(--food-green);font-size:23px;margin:0}
.app-dialog-product .quantity-control>.btn:hover:not(:disabled),[data-customer-cart] .quantity-control>.btn:hover:not(:disabled){background:#e3ead8}
.app-dialog-product .quantity-control>.form-control,[data-customer-cart] .quantity-control>.form-control{flex:1 1 0;min-width:0;width:0;border:0;border-radius:0;background:#fff;font-size:16px;font-weight:700;padding:0;min-height:48px;box-shadow:none;margin:0}
.app-dialog-product .quantity-control:focus-within,[data-customer-cart] .quantity-control:focus-within{outline:2px solid #416f59;outline-offset:2px}
.app-dialog-product .swal2-actions{position:sticky;bottom:0;flex-shrink:0;background:#fff;display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;width:100%;margin:0;padding:0 27px 20px;gap:8px!important}
.app-dialog-product .swal2-actions .swal2-confirm{order:0;min-height:48px;width:100%;border-radius:12px;font-size:16px;font-weight:800}
.app-dialog-product .swal2-actions .swal2-cancel{order:1;min-height:48px;border-color:transparent;font-size:13px}
.app-dialog-product .swal2-validation-message{margin:0 27px 16px;border-radius:10px;font-size:14px}
@media(max-width:580px){.app-dialog-product .swal2-html-container{padding:0 22px}.app-dialog-product .product-dialog-image{width:calc(100% + 44px);margin-inline:-22px}.app-dialog-product .product-dialog-heading{font-size:22px}.app-dialog-product .swal2-close{right:22px}.app-dialog-product .swal2-actions{padding-inline:22px}}

.app-dialog-product:has(.product-option-group) .swal2-actions{border-top:1px solid #e3e9e2;box-shadow:0 -8px 16px #163d3208}

/* Multi-select categories share the real checkbox/GET form, including no-JS. */
.category-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.category-choice{position:relative;display:block;min-width:0;cursor:pointer}
.category-choice-input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:1}
.category-choice-face{position:relative;display:flex;align-items:center;gap:8px;min-height:64px;height:100%;padding:12px 10px;border:1px solid #e3e9e2;border-radius:12px;background:#fff;color:var(--food-green);font-size:13px;font-weight:700;line-height:1.4;transition:background-color .15s,border-color .15s,color .15s}
.category-choice-face>.category-icon{width:24px;height:24px;flex-shrink:0}
.category-choice-face>i:not(.category-choice-check){font-size:24px;line-height:1;flex-shrink:0}
.category-choice-name{flex:1;min-width:0;overflow-wrap:anywhere}
.category-choice-check{position:absolute;right:5px;top:4px;font-size:13px;line-height:1;opacity:0}
.category-choice-input:hover+.category-choice-face{border-color:var(--food-green)}
.category-choice-input:checked+.category-choice-face{background:var(--food-green);border-color:var(--food-green);color:#fff}
.category-choice-input:checked+.category-choice-face>.category-icon,.category-choice-input:checked+.category-choice-face>i:not(.category-choice-check){color:#ffb28e}
.category-choice-input:checked+.category-choice-face>.category-choice-check{opacity:1}
.category-choice-input:focus-visible+.category-choice-face{outline:3px solid rgb(22 61 50 / 35%);outline-offset:2px}
@media(max-width:380px){.category-choice-grid{grid-template-columns:minmax(0,1fr)}}
@media(min-width:640px){.category-choice-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.category-choice-face{transition:none}}

/* Cart step and delete buttons share one size in each input mode. */
[data-customer-cart]{--cart-step-size:36px;--cart-step-font:20px;--cart-trash-icon:18px}
[data-customer-cart] .quantity-control{width:132px;max-width:100%;gap:4px;padding:4px}
[data-customer-cart] .quantity-control>.btn{flex-basis:var(--cart-step-size);width:var(--cart-step-size);height:var(--cart-step-size);min-height:var(--cart-step-size);padding:0;font-size:var(--cart-step-font)}
[data-customer-cart] .quantity-control>.form-control{min-height:var(--cart-step-size);font-size:14px}
[data-customer-cart] .quantity-action{width:var(--cart-step-size);height:var(--cart-step-size);min-height:var(--cart-step-size);flex-basis:var(--cart-step-size);border-radius:6px;padding:0}
[data-customer-cart] .quantity-action i{font-size:var(--cart-trash-icon);line-height:1}
[data-customer-cart] .cart-line-controls:has(.quantity-control) .cart-remove-form{margin-bottom:5px}
@media(pointer:coarse){[data-customer-cart]{--cart-step-size:44px}[data-customer-cart] .quantity-control{width:148px}}
@media(pointer:fine){[data-page=customer-carts] [data-customer-cart]{--cart-step-size:32px;--cart-step-font:18px;--cart-trash-icon:16px}[data-page=customer-carts] [data-customer-cart] .quantity-control{width:120px}}
