/*
 * Customer menu, second look: a calmer type scale, the restaurant's mark, item cards.
 * Loaded after shop-classic-refresh.css and shop-v2-shared.css. Styles only: remove its <link> to go back.
 */

@media (max-width: 767.98px) {
    html body.shop-customer-font {
        --v2-page: #f7f6f3;
        --v2-card: #ffffff;
        --v2-soft: #eeece6;
        --v2-line: #eae7e0;
        --v2-ink: #1c1b19;
        --v2-muted: #716d65;
    }

    html:not(.dark) body.shop-customer-font { --m-page: #f7f6f3; --m-ink: #1c1b19; --m-muted: #716d65; --m-line: #eae7e0; }
    html:not(.dark) body .shop-customer-nav,
    html:not(.dark) body .shop-customer-nav__bar { background: #fff !important; }

    /* The warm page shows through the wrappers, so the white cards read as cards */
    html:not(.dark) body.shop-customer-font .shop-shared-header--classic,
    html:not(.dark) body.shop-customer-font div:has(> #main-content),
    html:not(.dark) body.shop-customer-font #main-content,
    html:not(.dark) body.shop-customer-font #main-content .shop-classic-menu-shell,
    html:not(.dark) body.shop-customer-font #main-content .shop-classic-menu-shell :is(.shop-classic-contact-strip, .shop-classic-discovery, .shop-classic-order-context, .shop-classic-menu-tabs) { background: transparent !important; }

    /* Sizes hold in the light and the dark theme; the colour rules below are for the light one */
    html body #main-content .shop-classic-menu-shell .shop-classic-search input { min-height: 46px; border-radius: 14px; padding-block: 4px; font-size: 16px; font-weight: 400; }
    html body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options { display: flex !important; gap: 4px; padding: 4px; }
    html body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options > button.shop-classic-order-type.shop-classic-order-type { flex: 1 1 auto; width: auto; min-height: 44px; padding-inline: 8px; font-size: 12px; font-weight: 500; }
    html body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options > button.shop-classic-order-type.shop-classic-order-type.is-active { font-weight: 700; }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-select select { min-height: 40px; font-weight: 400; }
    html body #main-content .shop-classic-menu-shell .shop-classic-category-bar .shop-classic-category-nav button.shop-classic-category-pill.shop-classic-category-pill { min-height: 36px; padding: 0 16px; font-size: 13px; font-weight: 500; }
    html body #main-content .shop-classic-menu-shell .shop-classic-category-heading.shop-classic-category-heading { padding: 12px 0 10px; font-size: 16px; font-weight: 700; }

    /* Photo and contact line */
    html body .shop-header-carousel-frame { max-height: 140px; border-radius: 16px; }
    html body .shop-classic-menu-shell .shop-classic-contact-strip__branch { font-size: 12px; font-weight: 400; }
    html:not(.dark) body .shop-classic-menu-shell .shop-classic-contact-action,
    html:not(.dark) body .shop-classic-menu-shell .shop-classic-contact-action.is-whatsapp {
        width: 44px; height: 44px; min-height: 44px; border: 1px solid var(--v2-line) !important; border-radius: 12px; background: var(--v2-card) !important;
    }

    /* Search: a soft field. 16px text stops iOS zooming; the hint is smaller. */
    html:not(.dark) body .shop-classic-menu-shell .shop-classic-search input {
        min-height: 46px; border: 1px solid var(--v2-line) !important; border-radius: 14px; background: var(--v2-card) !important; padding-block: 4px; font-size: 16px; font-weight: 400;
    }
    html body .shop-classic-menu-shell .shop-classic-search input::placeholder { font-size: 13px; }

    /* Order type: one segmented control */
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options {
        display: flex !important; gap: 4px; border-radius: 14px !important; background: var(--v2-soft) !important; padding: 4px;
    }
    /* Segments share the row, and the longest label takes the room it needs */
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options > button.shop-classic-order-type.shop-classic-order-type { flex: 1 1 auto; width: auto; }
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options > button.shop-classic-order-type.shop-classic-order-type {
        border: 0 !important; border-radius: 11px !important; background: transparent !important; padding-inline: 8px; color: var(--v2-muted) !important; font-size: 12px; font-weight: 500;
    }
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options > button.shop-classic-order-type.shop-classic-order-type.is-active {
        background: var(--v2-card) !important; box-shadow: 0 1px 4px rgba(28, 27, 25, .10) !important; color: var(--v2-ink) !important; font-weight: 700;
    }
    html body #main-content .shop-classic-menu-shell .shop-classic-order-type .shop-classic-order-type__icon.shop-classic-order-type__icon { display: none; }

    /* Menu filter */
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-menu-select select {
        min-height: 40px; border: 1px solid var(--v2-line) !important; border-radius: 12px !important; background-color: var(--v2-card) !important; padding-inline: 12px 28px; color: var(--v2-muted); font-weight: 400;
        background-position: left 10px center !important; /* size stays 16px: smaller makes iOS zoom the page */
    }
    html[dir="ltr"] body #main-content .shop-classic-menu-shell .shop-classic-menu-select select { background-position: right 10px center !important; }

    /* Categories: pills, the chosen one in the restaurant's colour */
    html:not(.dark) body .shop-classic-menu-shell .shop-classic-category-bar { border-bottom: 0 !important; background: var(--v2-page) !important; }
    html body .shop-classic-menu-shell .shop-classic-category-strip { padding-block: 8px; }
    html body .shop-classic-menu-shell .shop-classic-category-nav { gap: 8px; }
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-category-bar .shop-classic-category-nav button.shop-classic-category-pill.shop-classic-category-pill {
        min-height: 36px; border: 1px solid var(--v2-line) !important; border-radius: 999px !important; background: var(--v2-card) !important; padding: 0 16px; color: var(--v2-muted) !important; font-size: 13px; font-weight: 500;
    }
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-category-bar .shop-classic-category-nav button.shop-classic-category-pill.shop-classic-category-pill.is-active {
        border-color: var(--m-action) !important; background: var(--m-action) !important; color: #fff !important; font-weight: 700;
    }
    html:not(.dark) body #main-content .shop-classic-menu-shell button.shop-classic-category-pill.shop-classic-category-pill.is-active span { color: #fff !important; }

    /* The pills look small; the touch area around each stays 44px tall */
    html body #main-content .shop-classic-menu-shell .shop-classic-category-bar button.shop-classic-category-pill { position: relative; }
    html body #main-content .shop-classic-menu-shell .shop-classic-category-bar button.shop-classic-category-pill::after { content: ''; position: absolute; inset: -4px 0; }

    /* Section title */
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-category-heading.shop-classic-category-heading {
        border: 0; padding: 12px 0 10px; font-size: 16px; font-weight: 700;
    }
    html body .shop-classic-menu-shell .shop-classic-category-section + .shop-classic-category-section { margin-top: 12px; }

    /* Items: one card each */
    html body .shop-classic-menu-shell .shop-classic-product-grid { gap: 10px; }
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-product-grid .shop-classic-menu-item-card.shop-classic-menu-item-card {
        border: 1px solid var(--v2-line) !important; border-radius: 16px !important; background: var(--v2-card) !important;
    }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-content.shop-classic-menu-item-content { padding: 12px !important; gap: 12px !important; }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-content:not(.has-no-image) { grid-template-columns: minmax(0, 1fr) 92px; }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-media.shop-classic-menu-item-media {
        width: 92px !important; height: 92px; min-height: 92px; max-height: 92px; flex-basis: 92px; border-radius: 12px;
    }
    html body .shop-classic-menu-shell .shop-classic-menu-item-details.shop-classic-menu-item-details { min-height: 92px; gap: 3px; }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-title.shop-classic-menu-item-title { font-size: 14px !important; font-weight: 600; line-height: 1.7; }
    /* A tall line keeps the dots under final Arabic letters from being cut off */
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-title.shop-classic-menu-item-title span { font-size: inherit; line-height: 1.75; }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-title img { width: 11px; height: 11px; flex: 0 0 11px; }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-description.shop-classic-menu-item-description {
        display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 11.5px; font-weight: 400; line-height: 1.7;
    }
    html body .shop-classic-menu-shell .shop-classic-menu-item-card .shop-classic-menu-item-details > .shop-classic-prep-chip.shop-classic-prep-chip { font-size: 10.5px; font-weight: 400; }
    html body .shop-classic-menu-shell .shop-classic-prep-chip::before { width: 12px; height: 12px; flex: 0 0 12px; }
    html body .shop-classic-menu-shell .shop-classic-item-bottom.shop-classic-item-bottom { min-height: 36px; padding-top: 4px; }
    html body #main-content .shop-classic-menu-shell .shop-classic-item-price.shop-classic-item-price { font-size: 14px; font-weight: 700; }
    html body .shop-classic-menu-shell .shop-classic-item-options-hint.shop-classic-item-options-hint { font-size: 12px; font-weight: 600; }

    /* Add: a small filled circle with a full-size touch area */
    html body #main-content .shop-classic-menu-shell button.shop-classic-add-button.shop-classic-add-button.shop-classic-add-button {
        position: relative; width: 36px; min-width: 36px; height: 36px; min-height: 36px;
    }
    html body .shop-classic-menu-shell button.shop-classic-add-button::after { content: ''; position: absolute; inset: -5px; }

    html body .shop-classic-menu-shell .shop-classic-out-of-stock { font-size: 11.5px; }

    /* The bar that opens the cart */
    html body .shop-classic-cart-bar .shop-classic-cart-panel .font-black { font-size: 15px; font-weight: 700; line-height: 1.7; }
    html body .shop-classic-cart-bar .shop-classic-cart-panel > :first-child { font-size: 13px; font-weight: 700; }
    html body .shop-classic-cart-bar .shop-classic-cart-panel .shop-classic-cart-button { font-size: 13px; }

}

@media (max-width: 359.98px) {
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-content:not(.has-no-image) { grid-template-columns: minmax(0, 1fr) 76px; }
    html body #main-content .shop-classic-menu-shell .shop-classic-menu-item-media.shop-classic-menu-item-media { width: 76px !important; height: 76px; min-height: 76px; max-height: 76px; flex-basis: 76px; }
    html:not(.dark) body #main-content .shop-classic-menu-shell .shop-classic-order-context .shop-classic-order-picker__options > button.shop-classic-order-type.shop-classic-order-type { font-size: 11px; }
}
