.global-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* menuRow: less white space beside the category bar and the cards. Three paddings stacked up on the sides
   (container-fluid 15px, .menu-page-container 24px, #menu-items 10px/5px); the side gutter is now the
   container's padding alone, so at every width the column's edges line up with the location card's */
#menu-row-page.container-fluid {
    padding-left: 0;
    padding-right: 0;
}
/* edges flush with the location card above (layout.html): it is 1220px at most, inside a 15px page padding */
#menu-row-page .menu-page-container {
    max-width: 1250px;
    padding-left: 15px;
    padding-right: 15px;
}
#menu-row-page #menu-items {
    padding-left: 0 !important;
}
/* the category heading's Bootstrap rows would otherwise poke 15px past the column (sideways scroll on phones) */
#menu-row-page #menu-items .row {
    margin-left: 0;
    margin-right: 0;
}
@media (max-width: 767px) {
    #menu-row-page #menu-items {
        padding: 0 !important;
    }
}

/* menuRow: when the order panel stacks under the items (template.css, 920px and narrower), leave the same
   20px gap after the last card that the cards have between them */
@media (max-width: 920px) {
    #menu-row-page .menu-content-row {
        row-gap: 20px;
    }
}

/* menuRow: dim the item list while a clicked category loads (see menuRow.html) */
#menu-items.menu-items-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.15s;
}

/* menuRow: category image shown as a banner ("Show image as banner" on the category in the admin app) */
.category-banner {
    position: relative;
    height: 300px;
    margin: 0 0 20px;
    border-radius: 14px;
    overflow: hidden;
    background: #f0f0f0;
}
.category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.category-banner-text {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 72px 28px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}
.category-banner-title {
    margin: 0;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
}
.category-banner-desc {
    margin: 6px 0 0;
    font-size: 15px;
    color: #f2f2f2;
}
/* menuRow: a card for an item's sizes ("Combine sizes into one card" on the category), a button per size.
   The buttons take the site's .add-to-order-btn colors from template.css. */
.menu-card-footer.menu-card-sizes {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
/* one-line pill: "SMALL · $3.25" */
.size-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
.size-btn-price::before {
    content: "\00B7";
    margin-right: 6px;
}
.size-btn-unavailable {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px dashed #bbb;
    color: #767676;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
/* every button on a menuRow card (Add to order and the size pills) is one fixed width so they all match.
   Desktop: 116px and 10px text, so three size pills fit on one line; the longest label in use,
   "QUARTER · $5.00", is 113px at this size. */
#menu-row-page .menu-card .add-to-order-btn,
#menu-row-page .menu-card .size-btn-unavailable {
    width: 116px;
    box-sizing: border-box;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 10px;
    text-align: center;
}
/* phones: 124px at the normal text size; two fit on a line and a third wraps to a second right-aligned line
   (three can't fit a phone card at a readable size) */
@media (max-width: 480px) {
    .menu-card-footer.menu-card-sizes {
        gap: 6px;
    }
    #menu-row-page .menu-card .add-to-order-btn,
    #menu-row-page .menu-card .size-btn-unavailable {
        width: 124px; /* longest label 122px at this padding */
        font-size: 11px;
    }
}
/* the smallest phones: two fixed-width buttons don't fit the card, so they go back to fitting their text */
@media (max-width: 360px) {
    #menu-row-page .menu-card .add-to-order-btn,
    #menu-row-page .menu-card .size-btn-unavailable {
        width: auto;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 10px;
    }
    .menu-card-sizes .size-btn {
        gap: 4px;
    }
    .size-btn-price::before {
        margin-right: 4px;
    }
}

/* no image file for the category: show the name and description as a plain heading instead */
.category-banner.banner-no-image {
    height: auto;
    border-radius: 0;
    background: none;
}
.category-banner.banner-no-image img {
    display: none;
}
.category-banner.banner-no-image .category-banner-text {
    position: static;
    padding: 0;
    background: none;
}
.category-banner.banner-no-image .category-banner-title {
    color: inherit;
}
.category-banner.banner-no-image .category-banner-desc {
    color: inherit;
}
@media (max-width: 640px) {
    .category-banner {
        height: 140px;
        margin-bottom: 14px;
    }
    .category-banner-text {
        padding: 40px 16px 12px;
    }
    .category-banner-title {
        font-size: 24px;
    }
    .category-banner-desc {
        font-size: 13px;
    }
}

/* customize.html: Required / Optional next to each modifier group's name (menuModern's pop-up uses the same colors) */
.modifier-group-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
    white-space: nowrap;
}
.modifier-group-badge.required {
    background: #fdeeee;
    color: #c0392b;
}
.modifier-group-badge.optional {
    background: #eef2f6;
    color: #5f6b7a;
}

/* Yes / No in the pop-up questions (order type, clear cart, upsize): the buttons use different site button
   styles (btn-first, btn-second, btn-third) for their colors, which also give them different padding, borders
   and margins; here they get the same size and line up, keeping their colors */
.bootbox .modal-footer .btn,
.page-card-buttons .btn {
    min-width: 100px;
    padding: 6px 24px;
    border-width: 2px;
    border-style: solid;
    line-height: 1.42857143;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
}

/* Simple content pages (Contact Us, Reset Your Password): a section in the same centered column as the location
   card, with white cards that look like it */
.page-section {
    max-width: 1220px;
    margin: 24px auto 40px;
    padding: 0 15px;
    clear: both;   /* below the floated site name above it */
}
.page-section .page-title {
    margin: 0 0 6px;
    color: #222;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}
.page-section .page-intro {
    margin: 0 0 20px;
    color: #555;
}
.page-card {
    border: 1px solid #d8d8d8;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
    padding: 22px 24px;
}
.page-card-narrow {
    max-width: 480px;
    margin: 0 auto;
}
.page-card .eyebrow {
    margin: 14px 0 4px;
    color: #991B20;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.page-card-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.page-card-buttons-end {
    justify-content: flex-end;
}
/* the site gives #back-btn and #reset-pwd-btn their own margins and padding; in the card they match */
.page-card-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 !important;
    padding: 6px 24px !important;
}
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    gap: 20px;
}
.contact-card-name {
    margin: 0 0 6px;
    font-size: 18px !important;   /* the site sets every h3 to 20px !important */
    font-weight: 700 !important;
    text-transform: uppercase;
}
.contact-card-address {
    margin: 0 0 8px;
    color: #555;
}
.contact-card-phone {
    font-weight: 700;
    color: #991B20;
}
.contact-card-hours {
    list-style: none;
    margin: 0;
    padding: 0;
}
.contact-card-hours li {
    padding: 2px 0;
    font-size: 14px;
}
/* the hours come as one h3 per line; show them as plain lines */
.contact-card-hours h3 {
    margin: 0;
    font-size: 14px !important;
    font-weight: 400;
    line-height: 1.5;
    color: #333;
}

/* Create Your Account / Your Account: the form card, alone in the middle, or with the order status and previous
   orders beside it; stacked on small screens */
.profile-layout {
    max-width: 760px;
    margin: 0 auto;
}
.profile-layout.has-side {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;   /* the side column is the menu page's order column width */
    gap: 24px;
    align-items: start;
}
.profile-page .page-title,
.profile-page .page-intro {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.profile-page:has(.has-side) .page-title,
.profile-page:has(.has-side) .page-intro {
    max-width: none;
}
.profile-card label {
    font-weight: 700;
}
.profile-card .checkbox {
    margin: 0 0 16px;
}
.profile-card .checkbox label {
    font-weight: 400;
}
.profile-row {
    display: grid;
    gap: 0 16px;
}
.profile-row-2 {
    grid-template-columns: 1fr 1fr;
}
.profile-row-city {
    grid-template-columns: 2fr 1fr 1fr;
}
.profile-dob {
    display: flex;
    gap: 8px;
}
.profile-dob select {
    flex: 1 1 0;
    min-width: 0;
}
.profile-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 320px;
}
.profile-phone input {
    flex: 3 1 0;
    min-width: 0;
}
.profile-phone .profile-phone-last {
    flex: 4 1 0;
}
#error-para:empty {
    display: none;
}
/* the My Order panel sized as on the menu page (the sites size it there with #menu-row-page #order-status) */
.profile-side #order-status {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
/* the panel is sticky on the menu page; here the side column also holds the order history, so it scrolls with the page */
.profile-side #order-status {
    position: static !important;
}
.profile-history-title {
    margin: 0 0 12px;
    font-size: 18px !important;
    font-weight: 700;
    text-transform: uppercase;
}
.profile-history-below {
    margin-top: 20px;
}
/* previous orders: a plain list of rows (date - restaurant) with a line between them, each opening to its items;
   the sites style #orderHistory as pink centered blocks with big red titles */
.profile-history #orderHistory {
    margin: 0;
}
.profile-history #orderHistory .panel {
    background: transparent;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
}
.profile-history #orderHistory .panel:last-child {
    border-bottom: 0;
}
.profile-history #orderHistory .panel-heading {
    background: transparent;
    padding: 10px 0;
    text-align: left;
    color: #222;
}
.profile-history #orderHistory .panel-title,
.profile-history #orderHistory .panel-title a {
    font-size: 14px !important;
    font-weight: 600;
    color: #222;
    text-transform: none;
    text-align: left;
    text-decoration: none;
}
.profile-history #orderHistory .panel-title a {
    display: block;
}
.profile-history #orderHistory .panel-title .fa {
    color: #991B20;
    margin-right: 6px;
}
.profile-history #orderHistory .panel-body {
    padding: 0 0 12px;
    border-top: 0;
    font-size: 13px;
}
.profile-history-none {
    margin: 0;
    color: #555;
}
.profile-pwd-form label {
    font-weight: 700;
}
#pwd-change-info:empty {
    display: none;
}
@media (max-width: 991px) {
    .profile-layout.has-side {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 600px) {
    .profile-row-2,
    .profile-row-city {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The error line at the top of the storefront pages (#error-para: "Sorry, this location is not accepting online
   orders...", "You must make a selection!", ...). It sits in a page-wide floated column, so long messages ran the
   full width of the screen; here it is a light red box in the centered column, and takes no room when empty. */
.row > [class*="col-"]:has(> #error-para) {
    float: none;
    width: auto;
}
#error-para {
    max-width: 1190px;
    margin: 14px auto;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #9b1c1c;
    background: #fdeeee;
    border: 1px solid #f3c4c1;
    border-radius: 10px;
    box-sizing: border-box;
}
#error-para:empty {
    display: none;
}
#error-para .error {
    font-size: inherit;
    color: inherit;
    font-weight: 600;
}
/* most messages end with a <br>, which would add an empty line inside the box */
#error-para br:last-child {
    display: none;
}

/* iPhone Safari zooms the page in when a text box under 16px is tapped (item comments, checkout, sign-up...), and
   doesn't zoom back out, so on touch screens every text box, dropdown and text area is 16px, as css/modern/mobile.css
   does for menuModern's pages. Desktop keeps the smaller size. */
@media (hover: none) and (pointer: coarse) {
    input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
    input[type=search], input:not([type]), select, textarea {
        font-size: 16px !important;
    }
}

/* combo pickers on the item page (fragments/comboModifierSelection.html): a meal or combo group as two short choices,
   e.g. Side and Drink, listed like the other options; a choice that doesn't go with the other picker's is faded out */
.combo-picker .combo-row-label {
    font-weight: 600;
    margin-bottom: 8px;
}
/* an option and its name in one label (modifier fragments), so touching the name picks the option */
.modifier-choice,
.combo-picker .combo-choice {
    font-weight: normal;
    margin: 0;
    cursor: pointer;
}
.combo-picker .combo-choice.unavailable {
    opacity: .45;
    cursor: not-allowed;
}
.combo-picker .combo-total {
    min-height: 18px;
    font-weight: 600;
}

/* item page (customize.html) on phones: options big enough to tap. Each option is a full-width row at least 48px
   tall with a divider between rows (the rows used to be 22px and touching), a 22px checkbox or radio, the group's
   name above its options instead of in a narrow column beside them, a tint on the chosen rows, and 44px
   quantity buttons */
@media (max-width: 767px) {
    #menuItemForm .customization-info > .control-label {
        float: none;
        width: 100%;
        text-align: left;
        padding-bottom: 8px;
    }
    #menuItemForm .customization-info > div[class*="col-xs-"] {
        float: none;
        width: 100%;
    }
    #menuItemForm .customization-info {
        margin-bottom: 18px;
    }
    #menuItemForm .customization-info .row.standard-text {
        margin: 0;
        border: 1px solid #ddd;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
    }
    #menuItemForm .customization-info .row.standard-text > [class*="col-xs-"] {
        float: none;
        width: 100%;
        padding: 0;
        border-bottom: 1px solid #e6e6e6;
    }
    #menuItemForm .customization-info .row.standard-text > [class*="col-xs-"]:last-child {
        border-bottom: 0;
    }
    #menuItemForm .modifier-choice,
    #menuItemForm .combo-picker .combo-choice {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 48px;
        padding: 10px 14px;
        line-height: 1.3;
    }
    #menuItemForm .modifier-choice input[type=checkbox],
    #menuItemForm .modifier-choice input[type=radio],
    #menuItemForm .combo-choice input[type=radio] {
        flex: 0 0 auto;
        width: 22px;
        height: 22px;
        margin: 0;
        accent-color: #991B20;
    }
    #menuItemForm .modifier-choice:has(input:checked),
    #menuItemForm .combo-choice:has(input:checked) {
        background: rgba(153, 27, 32, .08);
        font-weight: 600;
    }
    #menuItemForm .combo-picker .combo-row-label {
        margin: 10px 0 8px;
    }
    #menuItemForm .modifier-description {
        padding: 0 14px 10px 48px;
    }

    /* quantity: - box + in one line, each 44px */
    #menuItemForm .quantity-form {
        display: flex;
        align-items: center;
        gap: 10px;
        width: auto;
    }
    #menuItemForm .quantity-form > div {
        float: none;
        width: auto;
        padding: 0;
        margin: 0;
    }
    #menuItemForm #btnMinus,
    #menuItemForm #btnAdd {
        width: 44px;
        height: 44px;
        padding: 0;
        font-size: 16px;
    }
    #menuItemForm #inputQuantity {
        width: 64px;
        height: 44px;
        text-align: center;
    }
}

/* the cart list (CustomHtmlUtil.buildOrderStatusTable) on phones: in place of the table, each line laid out like
   menuModern's cart but without the photo -- the item's name, options and price (touching them opens Edit), and on
   the right the trash (- when there is more than one), the quantity and +. The table's Remove | Edit icons sat a few pixels apart and were easily pressed for each other.
   Desktop keeps the table. :is() with #order-status outranks template.css's #order-status table rules */
.cart-lines-phone {
    display: none;
}
@media (max-width: 767px) {
    :is(#order-status, body) table:has(+ .cart-lines-phone) {
        display: none !important;
    }
    :is(#order-status, body) .cart-lines-phone {
        display: block;
        margin: 4px 0 12px;
        border-top: 1px solid #e6e6e6;
    }
    .cart-line {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 0;
        border-bottom: 1px solid #e6e6e6;
    }
    :is(#order-status, body) .cart-line-main {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        flex: 1;
        min-width: 0;
        color: inherit;
        text-decoration: none;
    }
    .cart-line-info {
        display: flex;
        flex-direction: column;
        min-width: 0;
        text-align: left;
    }
    :is(#order-status, body) .cart-line-name {
        font-size: 15px !important;
        font-weight: 700;
        color: #1a1a1a;
        line-height: 1.25;
    }
    :is(#order-status, body) .cart-line-mods {
        margin-top: 3px;
        font-size: 13px !important;
        color: #6b6b6b;
        line-height: 1.3;
    }
    :is(#order-status, body) .cart-line-price {
        margin-top: 4px;
        font-size: 14px !important;
        font-weight: 600;
        color: #1a1a1a;
    }
    /* "Edit" under the price, as the text links were before; padded to a ~40px tall tap area */
    :is(#order-status, body) .cart-line-edit {
        align-self: flex-start;
        padding: 10px 16px 6px 0;
        font-size: 14px !important;
        font-weight: 600;
        line-height: 20px;
        color: #991B20;
        text-decoration: underline;
        text-underline-offset: 3px;
    }
    .cart-line-controls {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 4px;
    }
    /* 44px tap areas, the icon and circle drawn smaller inside them */
    .cart-line-remove,
    .cart-line-step {
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        background: none;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #555;
    }
    .cart-line-remove svg {
        width: 20px;
        height: 20px;
    }
    .cart-line-remove:active {
        color: #991B20;
    }
    .cart-line-step {
        font-size: 20px;
        line-height: 1;
        color: #1a1a1a;
        background: radial-gradient(circle, #fff 0 15px, #c9c9c9 15px 16px, transparent 16.5px);
    }
    .cart-line-step:disabled {
        opacity: .4;
    }
    :is(#order-status, body) .cart-line-qty {
        min-width: 16px;
        text-align: center;
        font-size: 15px !important;
        font-weight: 600;
    }
}

/* item page (customize.html) on phones: "< Back to Menu" at the top, so getting back doesn't mean scrolling down to
   the Back to Menu button under all the options */
.customize-back-link {
    display: none;
}
@media (max-width: 767px) {
    .customize-back-link {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        padding: 0 16px 0 0;
        margin: 4px 0 4px;
        font-size: 15px;
        font-weight: 600;
        color: #991B20;
        text-decoration: none;
    }
    .customize-back-link .glyphicon {
        font-size: 13px;
        top: 0;
    }
}
