/* Ordering overlays share a persistent close action outside AJAX content. */
.gp-ordering-modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    padding: 4px 8px;
    background: #fff;
    border-radius: 8px 8px 0 0;
}
.gp-ordering-modal-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d7cfc7;
    border-radius: 50%;
    background: #fff;
    color: #232323;
    font: 30px/1 Arial, sans-serif;
}
.gp-ordering-modal-close:focus-visible {
    outline: 3px solid #232323;
    outline-offset: 2px;
}
[id="addtocart"][aria-disabled="true"], #myaddresspopup .addlocation[aria-disabled="true"] { opacity: .55; cursor: wait; }

@media (max-width: 767px) {
    .cart-page .cart-item-row .cart-item-4, .cart-page .cart-item-row .cart-item-5 { grid-column: 2 / -1; }
    .cart-page .cart-item-row .cart-quantity-change { width: 44px; height: 44px; flex-shrink: 0; }
    .cart-page .cart-item-row .item-quantity-col input { height: 44px; font-size: 16px; }
    .cart-page #deleteItem { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -10px; }
}
@media (pointer: coarse) {
    .cart-page .cart-item-row .cart-quantity-change { width: 44px; height: 44px; flex-shrink: 0; }
    .cart-page .cart-item-row .item-quantity-col input { width: 44px; height: 44px; font-size: 16px; }
}
@media (max-width: 850px), (pointer: coarse) {
    body:has(.cart-page) #line-widget, body:has(.checkout-page) #line-widget { display: none !important; }
}

@media (max-width: 850px), (max-height: 600px) {
    :is(#startproductPopup, #halfproductPopup, #productPopup, #loginPopup, #myaddresspopup) .modal-dialog {
        position: relative;
        top: auto;
        left: auto;
        transform: none !important;
        width: calc(100% - 24px);
        max-width: 760px !important;
        margin: 12px auto calc(12px + env(safe-area-inset-bottom)) !important;
    }
    :is(#startproductPopup, #halfproductPopup, #productPopup, #loginPopup, #myaddresspopup) .modal-body {
        overflow: visible;
    }
    :is(#startproductPopup, #halfproductPopup) .service-order-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        height: auto;
        line-height: 1.4;
        padding: 10px 24px;
        white-space: normal;
    }
    #productPopup .about-img-col img { max-width: 100%; object-fit: contain; }
    #productPopup .quantity { font-size: 16px; }
    #productPopup .quntity-input-col button { min-height: 44px; }
    #myaddresspopup input[type="text"] { font-size: 16px; }
    #myaddresspopup .addlocation { min-height: 44px; height: auto; line-height: 1.4; padding: 12px 24px; }
    body:has(#myaddresspopup) > .pac-container { max-width: calc(100vw - 24px); max-height: 40dvh; overflow-y: auto; overscroll-behavior: contain; }
    body:has(#myaddresspopup) > .pac-container .pac-item { min-height: 44px; padding: 8px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
    body:has(#myaddresspopup) > .pac-container .pac-item-query { white-space: normal; }
}
