/*
 * Shared WooCommerce Food components.
 *
 * Colors and typography come from the ACF-driven theme properties.
 */

/* Product details modal */
#food_modal.ex_modal {
    background: color-mix(in srgb, var(--theme-dark-color) 82%, transparent);
}

#food_modal .modal-content,
#food_modal .modal-content.exmd-no-img {
    width: min(90%, 900px);
    max-width: 900px;
    margin: 12vh auto;
    color: var(--theme-text-color);
    background: var(--theme-light-color);
    border: 1px solid var(--theme-border-color);
    box-shadow: 0 24px 70px color-mix(in srgb, var(--theme-dark-color) 28%, transparent);
    font-family: var(--theme-body-font);
}

#food_modal .modal-content .ex-modal-big {
    align-items: stretch;
}

#food_modal .modal-content .fd_modal_des {
    color: var(--theme-text-color);
}

#food_modal .modal-content.exmd-no-img .fd_modal_des {
    padding: 42px 46px;
}

#food_modal .modal-content .fd_modal_des > h3,
#food_modal .modal-content.exwf-md-modern .fd_modal_img > h3 {
    margin: 0 0 28px;
    color: var(--theme-heading-color);
    font-family: var(--theme-heading-font);
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 500;
    line-height: 1.18;
    text-align: left;
    text-transform: none;
}

#food_modal .modal-content .fd_modal_des > h3::after {
    bottom: -15px;
    border-bottom-color: var(--theme-primary-color);
}

#food_modal .modal-content .fd_modal_des .exfd_nutrition {
    color: var(--theme-text-color);
    border-bottom-color: var(--theme-border-color);
}

#food_modal .modal-content .fd_modal_des .exfd_nutrition li {
    color: var(--theme-text-color);
}

#food_modal .modal-content .fd_modal_des .exfd_nutrition li span {
    color: var(--theme-muted-color);
    font-family: var(--theme-body-font);
}

#food_modal .modal-content .fd_modal_des h5 {
    margin: 20px 0;
    padding-bottom: 20px;
    color: var(--theme-primary-color);
    border-bottom-color: var(--theme-border-color);
    font-family: var(--theme-heading-font);
    font-size: 28px !important;
    line-height: 1.2;
    text-transform: none;
}

#food_modal .modal-content .fd_modal_des h5 del {
    color: var(--theme-muted-color);
}

#food_modal .modal-content .fd_modal_des h5 ins {
    color: inherit;
    background: transparent;
}

#food_modal .modal-content .exwoofood-ct,
#food_modal .modal-content .exwoofood-ct p,
#food_modal .modal-content .exwf-md-details {
    color: var(--theme-text-color);
    font-family: var(--theme-body-font);
    font-size: 16px;
    line-height: 1.65;
}

#food_modal .modal-content .exwoofood-ct p:last-child {
    margin-bottom: 0;
}

#food_modal .ex_close {
    display: flex;
    width: 42px;
    height: 42px;
    top: -18px;
    right: -18px;
    align-items: center;
    justify-content: center;
    color: var(--theme-light-color);
    background: var(--theme-primary-color);
    border: 3px solid var(--theme-light-color);
    font-family: var(--theme-body-font);
    font-size: 28px;
    line-height: 1;
}

#food_modal .ex_close:hover,
#food_modal .ex_close:focus {
    color: var(--theme-light-color);
    background: var(--theme-secondary-color);
    outline: none;
}

#food_modal .ex_close:focus-visible {
    outline: 2px solid var(--theme-primary-color);
    outline-offset: 3px;
}

/* Product ordering controls inside the modal */
#food_modal .exwoofood-woocommerce.woocommerce form.cart:not(.variations_form):not(.grouped_form) {
    display: flex;
    margin: 24px 0 0;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 12px;
}

#food_modal .exwoofood-woocommerce.woocommerce form.cart:not(.variations_form):not(.grouped_form) #exlive-total {
    width: 100%;
    flex: 0 0 100%;
}

#food_modal .modal-content.exmd-no-img #exlive-total {
    display: none !important;
}

#food_modal .exwoofood-woocommerce.woocommerce form.cart .quantity {
    display: flex;
    width: auto;
    min-width: 112px;
    margin: 0;
    align-items: center;
    color: var(--theme-text-color);
    background: var(--theme-surface-color);
    border: 1px solid var(--theme-border-color);
}

#food_modal .exwoofood-woocommerce.woocommerce form.cart .quantity .qty {
    width: 52px;
    min-height: 44px;
    margin: 0;
    padding: 8px;
    color: var(--theme-text-color);
    background: transparent;
    border: 0;
    box-shadow: none;
    text-align: center;
}

#food_modal .exwoofood-woocommerce.woocommerce form.cart .quantity .inqty-icon {
    color: var(--theme-primary-color);
}

#food_modal .exwoofood-woocommerce.woocommerce .cart:not(.grouped_form) .quantity input[type="button"] {
    color: var(--theme-light-color);
    background: var(--theme-primary-color);
    border: 1px solid var(--theme-primary-color);
    border-radius: 0;
    box-shadow: none;
}

#food_modal .exwoofood-woocommerce.woocommerce .cart:not(.grouped_form) .quantity input[type="button"]:hover,
#food_modal .exwoofood-woocommerce.woocommerce .cart:not(.grouped_form) .quantity input[type="button"]:focus {
    color: var(--theme-light-color);
    background: var(--theme-secondary-color);
    border-color: var(--theme-secondary-color);
}

#food_modal .exwoofood-woocommerce.woocommerce .cart:not(.grouped_form) .quantity input[type="button"]:focus-visible {
    outline: 2px solid var(--theme-primary-color);
    outline-offset: 2px;
}

#food_modal .exwoofood-woocommerce.woocommerce form.cart button[type="submit"] {
    min-height: 46px;
    margin: 0;
    padding: 12px 24px;
    color: var(--theme-light-color);
    background: var(--theme-primary-color);
    border: 1px solid var(--theme-primary-color);
    border-radius: 0;
    box-shadow: none;
    font-family: var(--theme-body-font);
    font-weight: 700;
}

#food_modal .exwoofood-woocommerce.woocommerce form.cart button[type="submit"]:hover,
#food_modal .exwoofood-woocommerce.woocommerce form.cart button[type="submit"]:focus {
    color: var(--theme-light-color);
    background: var(--theme-secondary-color);
    border-color: var(--theme-secondary-color);
}

#food_modal .exwoofood-woocommerce.woocommerce form.cart button[type="submit"]:focus-visible {
    outline: 2px solid var(--theme-primary-color);
    outline-offset: 3px;
}

@media screen and (max-width: 991px) {
    #food_modal .modal-content,
    #food_modal .modal-content.exmd-no-img {
        width: min(90%, 760px);
    }
}

@media screen and (max-width: 767px) {
    #food_modal .modal-content,
    #food_modal .modal-content.exmd-no-img {
        width: calc(100% - 36px);
        margin: 9vh auto;
    }

    #food_modal .modal-content .fd_modal_des,
    #food_modal .modal-content.exmd-no-img .fd_modal_des {
        padding: 32px 26px;
    }

    #food_modal .ex_close {
        top: -15px;
        right: -10px;
    }

    #food_modal .exwoofood-woocommerce.woocommerce form.cart:not(.variations_form):not(.grouped_form) {
        flex-direction: column;
    }

    #food_modal .exwoofood-woocommerce.woocommerce form.cart:not(.variations_form):not(.grouped_form) .quantity,
    #food_modal .exwoofood-woocommerce.woocommerce form.cart:not(.variations_form):not(.grouped_form) button[type="submit"] {
        width: 100%;
    }
}
