/* Restaurant frontend production fixes. */
body.restaurant-v8-body :where(h1, h2, h3, h4),
.restaurant-v10-success-active :where(h1, h2, h3),
.restaurant-v8-inline-checkout :where(h1, h2, h3) {
    font-weight: 700;
}

body.restaurant-v8-body :where(p, small, span),
.restaurant-v8-inline-checkout :where(p, label, input, textarea, select),
.restaurant-v7-cart :where(p, small, span) {
    font-weight: 400;
}

.restaurant-v8-icon-btn,
.restaurant-v8-cat-modal__close,
.restaurant-v7-cart__close,
.restaurant-v7-remove {
    display: inline-grid;
    place-items: center;
}

.restaurant-v8-icon-btn > svg,
.restaurant-v8-cat-modal__close > svg,
.restaurant-v7-cart__close > svg,
.restaurant-v7-remove > svg {
    display: block;
    margin: 0;
}

.restaurant-v7-cart__panel {
    width: min(var(--restaurant-v8-cart-panel-width, 600px), calc(100vw - 24px)) !important;
    max-width: var(--restaurant-v8-cart-panel-width, 600px) !important;
    right: 12px !important;
}

.restaurant-v7-cart__backdrop {
    cursor: pointer;
}

.restaurant-v7-item__buttons [data-restaurant-v7-edit],
.restaurant-v7-item__buttons .restaurant-v7-edit,
.restaurant-v7-item__buttons a[href*="edit"] {
    display: none !important;
}

.restaurant-v7-remove {
    font-size: 0 !important;
    width: 31px !important;
    min-width: 31px !important;
    height: 31px !important;
    min-height: 31px !important;
    padding: 0 !important;
}

.restaurant-v8-inline-checkout #customer_details > div.col-2 > div.woocommerce-shipping-fields:empty,
.restaurant-v8-inline-checkout #customer_details > div.col-2 > div.woocommerce-shipping-fields.restaurant-empty-shipping-fields,
#customer_details > div.col-2 > div.woocommerce-shipping-fields.restaurant-empty-shipping-fields {
    display: none !important;
}

.restaurant-v10-success-actions a,
.restaurant-v10-success-actions button:not([data-restaurant-v10-success-close]) {
    display: none !important;
}

.restaurant-v10-success-actions [data-restaurant-v10-success-close] {
    font-weight: 700 !important;
}

@media (max-width: 782px) {
    .restaurant-v7-cart__panel {
        width: calc(100vw - 24px) !important;
        max-width: calc(100vw - 24px) !important;
        right: 12px !important;
        left: auto !important;
    }
}

body.restaurant-v8-body,
.restaurant-v6-modal,
.restaurant-v7-cart,
.restaurant-v8-inline-checkout,
.restaurant-v10-success-active {
    font-family: var(--restaurant-v8-font-family, var(--skh-font-family, ui-sans-serif, system-ui, sans-serif));
    font-size: var(--restaurant-v8-font-size-body, var(--skh-font-size-body, 16px));
}

.restaurant-v6-product h2 {
    font-size: var(--restaurant-v8-font-size-product-modal-title, clamp(28px, 3.8vw, 46px));
}

.restaurant-v7-cart__header h2 {
    font-size: var(--restaurant-v8-font-size-cart-title, clamp(24px, 3vw, 34px));
}

.restaurant-v8-inline-checkout :where(h2, h3),
.restaurant-v8-inline-checkout #order_review_heading {
    font-size: var(--restaurant-v8-font-size-checkout-title, clamp(22px, 2.6vw, 30px));
}

.restaurant-v10-success-active :where(h1, h2) {
    font-size: var(--restaurant-v8-font-size-section-title, var(--skh-font-size-section-title, clamp(28px, 4vw, 46px)));
}

.restaurant-v6-modal :where(h4, .product_title),
.restaurant-v8-product-row h4 {
    font-size: var(--restaurant-v8-font-size-product-card-title, var(--restaurant-v8-font-size-card-title, var(--skh-font-size-card-title, 20px)));
}

.restaurant-v8-product-row p {
    font-size: var(--restaurant-v8-font-size-product-description, clamp(11px, 1.2vw, 14px));
}

.restaurant-v6-product__summary {
    font-size: var(--restaurant-v8-font-size-product-modal-description, var(--restaurant-v8-font-size-body, 17px));
}

.restaurant-v7-cart .restaurant-v7-item__top h3 {
    font-size: var(--restaurant-v8-cart-item-title-size, 15px);
}

.restaurant-v8-icon-btn svg,
.restaurant-v8-category-sidebar__search svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 600px) {
    body.restaurant-v8-body .restaurant-v7-fab:not(.is-toolbar-mounted) {
        left: auto !important;
        right: calc(12px + env(safe-area-inset-right)) !important;
        bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        width: auto !important;
        max-width: min(320px, calc(100vw - 24px)) !important;
        min-height: 58px !important;
        justify-content: flex-start !important;
        padding: 7px 10px 7px 7px !important;
        border-radius: 999px !important;
    }

    body.restaurant-v8-body .restaurant-v7-fab:not(.is-toolbar-mounted) .restaurant-v7-fab__text {
        max-width: 145px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .restaurant-v6-product h2 {
        font-size: var(--restaurant-v8-font-size-product-modal-title-mobile, clamp(26px, 7vw, 34px)) !important;
    }

    .restaurant-v6-product__summary {
        font-size: var(--restaurant-v8-font-size-product-modal-description-mobile, 16px) !important;
    }

    .restaurant-v8-product-row p {
        font-size: var(--restaurant-v8-font-size-product-description-mobile, 13px) !important;
    }

    .restaurant-v7-cart__header h2 {
        font-size: var(--restaurant-v8-font-size-cart-title-mobile, 26px) !important;
    }

    .restaurant-v8-inline-checkout :where(h2, h3),
    .restaurant-v8-inline-checkout #order_review_heading {
        font-size: var(--restaurant-v8-font-size-checkout-title-mobile, 22px) !important;
    }
}

@media (max-width: 390px) {
    body.restaurant-v8-body .restaurant-v7-fab:not(.is-toolbar-mounted) .restaurant-v7-fab__text {
        max-width: 118px !important;
    }
}

/* Refined focus outlines — accessible but not visually heavy */
.restaurant-v7-cart__panel :focus-visible,
.restaurant-v8-inline-checkout :focus-visible,
body.restaurant-v8-body .restaurant-v8-toolbar :focus-visible,
body.restaurant-v8-body .restaurant-v8-product-row :focus-visible {
    outline-width: 1.5px !important;
    outline-offset: 1px !important;
    outline-style: auto !important;
}
