/* Screen-size type.
   Phones and tablets lighten weights and step sizes down.
   Desktop (992px and up) keeps the heavier heading and button styles.
   Icon fonts are restored at the end so Font Awesome stays intact.
   Text fields stay at 16px so iOS does not zoom them on focus. */

@media screen and (max-width: 991.98px) {
    body :is(
        input,
        textarea,
        select
    ):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) {
        font-size: 16px !important;
        font-weight: 400 !important;
    }

    body :is(
        .fw-bold,
        .fw-bolder,
        .fw-semibold,
        .fw-medium,
        .nav-link,
        .dropdown-item,
        .dropdown-header,
        .form-label,
        label,
        legend,
        .badge,
        .page-link,
        .list-group-item,
        .shefa-member-tab,
        .shefa-mobile-promo-link,
        .shefa-hg-promo-link,
        .shefa-blp-menu-link,
        .shefa-auth-link,
        .shefa-farm-section,
        .shefa-saved-tab,
        .shefa-home-v2-near,
        .shefa-home-v2-herd-kicker,
        .shefa-home-v2-share-tag
    ):where(:not(.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands)) {
        font-weight: 500 !important;
    }

    body .shefa-mobile-promo-link,
    body .shefa-hg-promo-link,
    body .shefa-blp-menu-link {
        font-size: 1rem !important;
        line-height: 1.3 !important;
    }

    body .shefa-visitor-links a,
    body .shefa-mobile-bar-action a,
    body .shefa-mobile-bar-action button {
        font-weight: 500 !important;
        font-size: 0.875rem !important;
    }

    body :is(strong, b, th, summary):where(:not(.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands)) {
        font-weight: 600 !important;
    }

    body :is(
        h1, h2, h3, h4, h5, h6,
        .h1, .h2, .h3, .h4, .h5, .h6,
        .display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
        .card-title,
        .modal-title,
        .offcanvas-title,
        .accordion-button,
        .shefa-portal-title,
        .shefa-mobile-bar-title
    ) {
        font-weight: 600 !important;
        letter-spacing: 0 !important;
    }

    body .product-card .card-title {
        font-size: 15px !important;
        line-height: 20px !important;
        height: 40px !important;
        font-weight: 600 !important;
    }

    body :is(
        .btn,
        button,
        .sh-btn,
        .shefa-home-v2-btn-search,
        .shefa-home-v2-near,
        .shefa-food-card-btn,
        .shefa-share-join,
        .shefa-label-primary,
        .shefa-cart-qty-btn
    ):where(:not(.btn-close, .shefa-chat-emoji-btn, .shefa-chat-reaction-emoji)) {
        font-weight: 500 !important;
        letter-spacing: 0 !important;
    }

    body :is(input[type="button"], input[type="submit"], input[type="reset"]) {
        font-weight: 500 !important;
        font-size: 1rem !important;
        letter-spacing: 0 !important;
    }

    body :is(
        .btn,
        .sh-btn,
        .shefa-home-v2-btn-search,
        .shefa-food-card-btn,
        .shefa-share-join,
        .shefa-label-primary
    ):where(:not(.btn-close, .btn-sm, .btn-link)) {
        font-size: 1rem !important;
        line-height: 1.25 !important;
    }

    body :is(
        .btn-success,
        .btn-primary,
        .btn-dark,
        .sh-btn,
        .shefa-home-v2-btn-search,
        .shefa-food-card-btn,
        .shefa-share-join,
        .shefa-label-primary
    ):where(:not(.btn-outline-success, .btn-outline-primary, .btn-outline-dark, .shefa-food-card-btn--notify, .btn-close, .btn-sm)) {
        font-weight: 600 !important;
    }

    body :is(.btn-sm, .btn-link, .shefa-cart-qty-btn),
    body .btn-group-sm > .btn {
        font-size: 0.875rem !important;
        font-weight: 500 !important;
    }

    body :is(.btn-sm.btn-success, .btn-sm.btn-primary, .btn-sm.btn-dark, .btn-group-sm > .btn-success, .btn-group-sm > .btn-primary, .btn-group-sm > .btn-dark) {
        font-weight: 600 !important;
    }

    body .shefa-home-v2-herd a,
    body .shefa-home-v2-section-head a {
        font-weight: 500 !important;
        font-size: 1rem !important;
    }

    body div.dt-buttons :is(.btn, button, .dt-button),
    body .dataTables_wrapper .paginate_button {
        font-size: 0.82rem !important;
        font-weight: 600 !important;
    }

    body :is(.fas, .fa-solid, .fa-sharp) {
        font-weight: 900 !important;
    }

    body :is(.far, .fa-regular, .fab, .fa-brands, .fa-light) {
        font-weight: 400 !important;
    }
}

@media screen and (max-width: 575.98px) {
    body :is(h1, .h1, .display-4, .display-5, .display-6) {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
    }

    body :is(.display-1, .display-2, .display-3) {
        font-size: 1.75rem !important;
        line-height: 1.15 !important;
    }

    body :is(h2, .h2) {
        font-size: 1.25rem !important;
        line-height: 1.25 !important;
    }

    body :is(h3, .h3) {
        font-size: 1.125rem !important;
        line-height: 1.3 !important;
    }

    body :is(h4, .h4, h5, .h5, h6, .h6) {
        font-size: 1rem !important;
        line-height: 1.35 !important;
    }

    body .shefa-mobile-bar-title {
        font-size: 1.125rem !important;
        line-height: 1.25 !important;
    }

    body .shefa-portal-title,
    body .modal-title {
        font-size: 1.35rem !important;
        line-height: 1.25 !important;
    }
}

@media screen and (min-width: 576px) and (max-width: 991.98px) {
    body :is(h1, .h1, .display-5, .display-6) {
        font-size: 1.75rem !important;
        line-height: 1.2 !important;
    }

    body :is(.display-1, .display-2) {
        font-size: 2.15rem !important;
        line-height: 1.1 !important;
    }

    body :is(.display-3, .display-4) {
        font-size: 1.9rem !important;
        line-height: 1.15 !important;
    }

    body :is(h2, .h2) {
        font-size: 1.4rem !important;
        line-height: 1.25 !important;
    }

    body :is(h3, .h3) {
        font-size: 1.2rem !important;
        line-height: 1.3 !important;
    }

    body :is(h4, .h4) {
        font-size: 1.1rem !important;
        line-height: 1.35 !important;
    }

    body :is(h5, .h5, h6, .h6) {
        font-size: 1rem !important;
        line-height: 1.35 !important;
    }

    body .shefa-mobile-bar-title {
        font-size: 1.25rem !important;
        line-height: 1.25 !important;
    }

    body .shefa-portal-title,
    body .modal-title {
        font-size: 1.5rem !important;
        line-height: 1.25 !important;
    }
}
