/* Shared quantity controls; all price calculations remain in pricing.js. */
.product-order .order-controls .mm-product-quantity {
    display: flex;
    flex: 0 0 110px;
    align-items: stretch;
    min-width: 0;
    height: 46px;
    border: 1px solid #9ca6ad;
    background: #fff;
}
.product-order .order-controls .mm-product-quantity .quantity {
    flex: 1 1 auto;
    width: 0;
    min-width: 0;
    margin: 0;
}
.product-order .order-controls .mm-product-quantity .quantity input.qty {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 4px 2px;
    border: 0;
    border-radius: 0;
    text-align: center;
    font: inherit;
    appearance: textfield;
    -moz-appearance: textfield;
}
.product-order .mm-product-quantity input::-webkit-outer-spin-button,
.product-order .mm-product-quantity input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.product-order .order-controls .mm-product-quantity .mm-qty-adjust {
    display: inline-flex;
    flex: 0 0 30px;
    width: 30px;
    min-width: 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    color: var(--ink);
    background: #f4f5f6;
    font-size: 19px;
    line-height: 1;
    transition: color .2s ease, background-color .2s ease;
}
.product-order .order-controls .mm-product-quantity .mm-qty-adjust:hover { color: #ff6600; background: #fff1e6; }
.product-order .order-controls .mm-product-quantity .mm-qty-adjust:disabled { color: #9ca6ad; cursor: default; }
.detail-order .order-controls .mm-product-quantity { height: 48px; }
.product-order .order-controls > button[type=submit]:disabled { opacity: .65; cursor: wait; }
.product-order a.added_to_cart { display: none; }
@media (max-width: 700px) {
    .product-order .order-controls .mm-product-quantity { flex-basis: 120px; min-height: 46px; }
    .product-order .order-controls .mm-product-quantity .mm-qty-adjust { flex-basis: 36px; width: 36px; }
}

/* Native notice data remains available to WooCommerce; presentation uses toasts. */
.mm-notice-toasted { display: none !important; }
#mm-cart-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    box-sizing: border-box;
    width: min(520px, calc(100vw - 48px));
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    padding: 12px 44px 12px 16px;
    border: 1px solid #59636b;
    border-left: 4px solid #ff6600;
    border-radius: 0;
    background: var(--ink, #20272b);
    color: #fff;
    box-shadow: 0 8px 24px rgb(0 0 0 / 18%);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    white-space: normal;
    text-align: left;
    overflow-wrap: anywhere;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
#mm-cart-toast.active { opacity: 1; transform: translateY(0); pointer-events: auto; }
#mm-cart-toast .mm-toast-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    min-width: 0;
    max-width: 100%;
}
#mm-cart-toast .mm-toast-text { flex: 1 1 220px; min-width: 0; max-width: 100%; white-space: normal; }
#mm-cart-toast .mm-toast-messages { flex: 1 1 100%; min-width: 0; max-width: 100%; white-space: normal; }
#mm-cart-toast .mm-toast-message:not(ul) { display: flex; flex-flow: row wrap; align-items: center; gap: 16px; }
#mm-cart-toast.is-error { border-left-color: #e65c50; }
#mm-cart-toast .mm-toast-message { margin: 0; padding: 0; background: none; border: 0; color: inherit; }
#mm-cart-toast .mm-toast-message + .mm-toast-message { margin-top: 12px; }
#mm-cart-toast ul.mm-toast-message { padding-left: 20px; }
#mm-cart-toast li + li { margin-top: 6px; }
#mm-cart-toast p { margin: 0 0 8px; }
#mm-cart-toast a { color: #ff6600; }
#mm-cart-toast .mm-toast-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    align-self: center;
    order: 1;
    box-sizing: border-box;
    max-width: 100%;
    float: none;
    margin: 0;
    padding: 7px 10px;
    border: 0;
    border-radius: 0;
    background: #ff6600;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s ease;
}
#mm-cart-toast .mm-toast-cart-btn:hover { background: #df5800; }
#mm-cart-toast .mm-toast-close {
    position: absolute;
    top: 8px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 22px;
    cursor: pointer;
}
#mm-cart-toast .mm-toast-close:hover { color: #ff6600; }
#mm-cart-toast :focus-visible { outline: 2px solid #ff6600; outline-offset: 3px; }
@media (max-width: 520px) {
    #mm-cart-toast .mm-toast-content { flex-direction: column; align-items: stretch; gap: 10px; }
    #mm-cart-toast .mm-toast-text { flex: 0 1 auto; }
    #mm-cart-toast .mm-toast-cart-btn { align-self: flex-start; }
    #mm-cart-toast { right: 16px; bottom: 16px; width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 12px 44px 12px 16px; }
}
@media (prefers-reduced-motion: reduce) { #mm-cart-toast { transition: none; transform: none; } }

/* Keep the quantity/action layout for products priced on request. */
.product-order-unavailable .mm-product-quantity .quantity input.qty:disabled {
    color: #9ca6ad;
    background: #f4f5f6;
    opacity: 1;
    -webkit-text-fill-color: #9ca6ad;
}
.product-order-unavailable .order-controls > .product-request-link {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 8px 10px;
    font-size: 14px;
    line-height: 1.3;
}
.product-order-unavailable .order-controls > .mm-order-unavailable:disabled {
    opacity: .45;
    cursor: not-allowed;
}
.product-order-unavailable .order-controls > .mm-order-unavailable:disabled:hover {
    background: var(--orange);
}
