﻿/* Ordering pages (table, takeaway, delivery). Colours follow the restaurant's design, with MyDinner's as fallback. */

.ordering-page {
    --ordering-header-height: 64px;
    min-height: 100dvh;
    color: var(--portal-ink);
    font-family: var(--rp-font-body, 'Poppins', system-ui, sans-serif);
}

html.ordering-locked,
html.ordering-locked body {
    overflow: hidden;
}

/* Header: one bar with its own height, so nothing slides under it. */
.ordering-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: var(--ordering-header-height);
    padding: 8px max(16px, env(safe-area-inset-left));
    background: color-mix(in srgb, var(--portal-surface) 92%, transparent);
    border-bottom: 1px solid var(--portal-line);
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.ordering-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ordering-header__logo {
    flex: none;
    width: 40px;
    height: 40px;
}

.ordering-header__name {
    overflow: hidden;
    color: var(--rp-primary, var(--portal-ink));
    font-family: var(--rp-font-display, inherit);
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ordering-header__actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

/* The language menu sits in the header here, not in a corner of the page. */
.ordering-header .portal-language {
    position: relative;
    inset: auto;
}

.ordering-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}

.ordering-chip:hover,
.ordering-chip:focus-visible {
    border-color: var(--portal-violet);
    background: var(--portal-violet-soft);
}

.ordering-chip svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--portal-violet);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 560px) {
    .ordering-chip--account span {
        display: none;
    }

    .ordering-chip--account {
        width: 36px;
        padding: 0;
        justify-content: center;
    }
}

.ordering-main {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 16px 16px 120px;
    box-sizing: border-box;
}

.ordering-notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--portal-violet-soft);
    color: var(--portal-ink);
    font-size: 14px;
    line-height: 1.45;
}

/* Layers: one at a time, over a backdrop that closes it. */
.ordering-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgb(18 12 34 / 48%);
    animation: ordering-fade .18s ease-out;
}

.ordering-layer {
    position: relative;
    width: min(100%, 520px);
    max-height: min(88dvh, 860px);
    overflow: auto;
    padding: 24px 20px 20px;
    border-radius: var(--rp-radius, 20px);
    background: var(--portal-surface);
    color: var(--portal-ink);
    box-shadow: 0 24px 60px rgb(0 0 0 / 22%);
    box-sizing: border-box;
    animation: ordering-rise .22s ease-out;
}

/* The checkout holds the most: more room on large screens. */
.ordering-layer--checkout {
    width: min(100%, 680px);
}

/* A thin scrollbar in the dialog's own colours; the browser's white one stood out on dark designs. */
.ordering-layer {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--portal-ink) 30%, transparent) transparent;
}

.ordering-layer::-webkit-scrollbar {
    width: 8px;
}

.ordering-layer::-webkit-scrollbar-track {
    background: transparent;
}

.ordering-layer::-webkit-scrollbar-thumb {
    border-radius: 8px;
    background: color-mix(in srgb, var(--portal-ink) 30%, transparent);
}

/* The account is MyDinner's, as on /Portal: never in the restaurant's design. Every colour the account
   components read is reset here, the --portal-* ones too, since :root resolved those from the theme. */
.ordering-layer--account {
    width: min(100%, 980px);
    --rp-primary: #5E17EB;
    --rp-primary-text: #fff;
    --rp-accent: #C7FF17;
    --rp-accent-text: #260B7E;
    --rp-background: #fff;
    --rp-surface: #fff;
    --rp-text: #1F1B2E;
    --rp-muted: #6B6680;
    --rp-line: #ECE8F5;
    --rp-radius: 20px;
    --rp-border: 1px;
    --rp-shadow: 0 4px 14px rgb(94 23 235 / 12%);
    --rp-font-display: Poppins, sans-serif;
    --rp-font-body: Poppins, sans-serif;
    --portal-violet: #5E17EB;
    --portal-violet-soft: #F1ECFF;
    --portal-deep: #431099;
    --portal-on-violet: #fff;
    --portal-surface: #fff;
    --portal-ink: #1F1B2E;
    --portal-muted: #6B6680;
    --portal-line: #ECE8F5;
    background: #fff;
    color: #1F1B2E;
    font-family: Poppins, sans-serif;
}

/* Signed out it is just the login box: as wide as its picture, which runs to the edges. */
.ordering-layer--account.ordering-layer--signin {
    width: min(100%, 460px);
    padding: 0;
}

/* The portal leaves room for its side rail; the ordering page has none. */
.ordering-account.portal-section #profileManagementContent,
.ordering-account.portal-section #profileManagementContent.account--dashboard {
    margin-left: 0;
    margin-right: 0;
}

.ordering-layer--signin .ordering-account #loginWindow {
    width: 100%;
    margin: 0;
}

.ordering-layer__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--portal-violet-soft);
    cursor: pointer;
}

.ordering-layer__close svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: var(--portal-ink);
    stroke-width: 2;
    stroke-linecap: round;
}

.ordering-layer__title {
    margin: 0 44px 6px 0;
    font-family: var(--rp-font-display, inherit);
    font-size: 20px;
    font-weight: 600;
}

.ordering-layer__text {
    margin: 0 0 16px;
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.45;
}

/* On a phone, layers come up from the bottom. */
@media (max-width: 640px) {
    .ordering-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .ordering-layer {
        width: 100%;
        max-height: 92dvh;
        border-radius: var(--rp-radius, 20px) var(--rp-radius, 20px) 0 0;
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

@keyframes ordering-fade {
    from { opacity: 0; }
}

@keyframes ordering-rise {
    from { opacity: 0; transform: translateY(16px); }
}

@media (prefers-reduced-motion: reduce) {
    .ordering-backdrop,
    .ordering-layer {
        animation: none;
    }
}

/* Table */
.ordering-table-dialog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
}

.ordering-table-dialog__table {
    min-height: 52px;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.ordering-table-dialog__table:hover,
.ordering-table-dialog__table:focus-visible {
    border-color: var(--portal-violet);
}

.ordering-table-dialog__table.is-current {
    border-color: var(--portal-violet);
    background: var(--portal-violet);
    color: var(--portal-on-violet);
}

/* Notifications */
.ordering-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 80;
    max-width: min(92vw, 460px);
    padding: 12px 18px;
    border-radius: 14px;
    background: var(--portal-ink);
    color: #fff;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .2s ease, transform .2s ease;
}

.ordering-toast--error {
    background: #B3261E;
}

.ordering-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* A link that leads nowhere */
.ordering-missing {
    font-family: 'Poppins', system-ui, sans-serif;
    color: var(--portal-ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 420px;
    margin: 18vh auto 0;
    padding: 0 16px;
    text-align: center;
}

.ordering-missing h1 {
    margin: 16px 0 0;
    font-size: 22px;
}

.ordering-missing p {
    margin: 0;
    color: var(--portal-muted);
}

/* Hero: the restaurant's picture and name */
.ordering-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 180px;
    overflow: hidden;
    background: var(--portal-violet-soft);
}

.ordering-hero--plain {
    min-height: 0;
}

.ordering-hero__picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ordering-hero:not(.ordering-hero--plain)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgb(0 0 0 / 55%), transparent 65%);
}

/* On wide screens the picture sits in the content column with the photo's own proportions: across a full
   2000 px window at 180 px high it showed only a stretched strip of it. */
@media (min-width: 768px) {
    .ordering-hero:not(.ordering-hero--plain) {
        width: min(100% - 32px, 1180px);
        margin: 16px auto 0;
        aspect-ratio: 16 / 5;
        min-height: 200px;
        max-height: 380px;
        border-radius: var(--rp-radius, 20px);
    }

    .ordering-hero:not(.ordering-hero--plain) .ordering-hero__text {
        width: 100%;
        padding: 24px;
    }
}

.ordering-hero__text {
    position: relative;
    z-index: 1;
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 20px 16px 16px;
    box-sizing: border-box;
}

.ordering-hero__name {
    margin: 0;
    color: var(--rp-primary, var(--portal-ink));
    font-family: var(--rp-font-display, inherit);
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 600;
    line-height: 1.15;
}

.ordering-hero__channel {
    margin: 4px 0 0;
    color: var(--portal-muted);
    font-size: 14px;
}

.ordering-hero:not(.ordering-hero--plain) .ordering-hero__name,
.ordering-hero:not(.ordering-hero--plain) .ordering-hero__channel {
    color: #fff;
}

/* Categories: one row that scrolls sideways, without a bar */
.ordering-categories {
    position: sticky;
    top: var(--ordering-header-height);
    z-index: 20;
    display: flex;
    gap: 8px;
    margin: 0 -16px 8px;
    padding: 10px 16px;
    overflow-x: auto;
    background: var(--rp-background, var(--portal-surface));
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.ordering-categories::-webkit-scrollbar {
    display: none;
}

.ordering-category {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px 0 6px;
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: inherit;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
    transition: border-color .2s ease, background-color .2s ease;
}

.ordering-category:not(:has(img)) {
    padding-left: 14px;
}

.ordering-category img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.ordering-category:hover,
.ordering-category:focus-visible {
    border-color: var(--portal-violet);
}

.ordering-category.is-selected {
    border-color: var(--portal-violet);
    background: var(--portal-violet);
    color: var(--portal-on-violet);
}

.ordering-section-title {
    margin: 12px 0;
    font-family: var(--rp-font-display, inherit);
    font-size: 20px;
    font-weight: 600;
}

/* Products */
.ordering-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 12px;
}

.ordering-product {
    display: flex;
    gap: 12px;
    min-height: 120px;
    padding: 10px;
    border: 1px solid var(--rp-border, var(--portal-line));
    border-radius: var(--rp-radius, 18px);
    background: var(--portal-surface);
    color: inherit;
    font: inherit;
    text-align: left;
    box-shadow: var(--rp-shadow, 0 1px 2px rgb(0 0 0 / 5%));
    cursor: pointer;
    transition: border-color .2s ease;
}

.ordering-product:hover,
.ordering-product:focus-visible {
    border-color: var(--portal-violet);
}

.ordering-product__picture {
    flex: none;
    width: 104px;
    height: 104px;
    border-radius: calc(var(--rp-radius, 18px) - 6px);
    object-fit: cover;
}

.ordering-product__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ordering-product__name {
    font-weight: 600;
    line-height: 1.3;
}

.ordering-product__description {
    display: -webkit-box;
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 13px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ordering-product__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.ordering-product__price {
    color: var(--rp-primary, var(--portal-ink));
    font-weight: 600;
}

/* Product dialog */
.ordering-product-dialog__picture {
    display: block;
    width: calc(100% + 40px);
    max-height: 260px;
    margin: -24px -20px 16px;
    object-fit: cover;
}

.ordering-product-dialog__description {
    margin: 0 0 10px;
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.45;
}

.ordering-product-dialog__label {
    margin: 14px 0 6px;
    font-size: 13px;
    font-weight: 600;
}

.ordering-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ordering-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
}

.ordering-option__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.ordering-option__text small {
    color: var(--portal-violet);
    font-size: 11px;
}

.ordering-option__price {
    color: var(--portal-muted);
    font-size: 13px;
}

.ordering-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ordering-stepper button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--portal-line);
    border-radius: 50%;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ordering-stepper button:disabled {
    opacity: .35;
    cursor: default;
}

.ordering-stepper--large button {
    width: 38px;
    height: 38px;
}

.ordering-product-dialog__actions {
    position: sticky;
    bottom: -20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px -20px -20px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--portal-line);
    background: var(--portal-surface);
}

.ordering-button {
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: var(--portal-violet);
    color: var(--portal-on-violet);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.ordering-button:disabled {
    opacity: .5;
    cursor: default;
}

.ordering-button--quiet {
    border: 1px solid var(--portal-line);
    background: var(--portal-surface);
    color: var(--portal-ink);
}

/* Loading */
.ordering-menu-loading {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 12px;
}

.ordering-skeleton {
    height: 120px;
    border-radius: 18px;
    background: linear-gradient(90deg, var(--portal-line), var(--portal-violet-soft), var(--portal-line));
    background-size: 200% 100%;
    animation: ordering-shimmer 1.2s linear infinite;
}

@keyframes ordering-shimmer {
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ordering-skeleton {
        animation: none;
    }
}

/* Google Translate works quietly: no bar at the top, no hover boxes, no tooltips. */
.ordering-page ~ .VIpgJd-ZVi9od-ORHb-OEVmcd,
iframe.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf-ti6hGc,
#goog-gt-vt {
    display: none !important;
}

html:has(.ordering-page) body {
    top: 0 !important;
}

.ordering-page .VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q {
    background-color: transparent !important;
    box-shadow: none !important;
}

.ordering-product__add {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--portal-violet-soft);
    color: var(--portal-violet);
    transition: background-color .15s ease, color .15s ease;
}

.ordering-product__add svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (hover: hover) {
    .ordering-product:hover .ordering-product__add {
        background: var(--portal-violet);
        color: var(--portal-on-violet);
    }
}

/* Basket: beside the menu on wide screens, behind a bar on phones */
.ordering-cart-panel {
    display: none;
}

@media (min-width: 1000px) {
    .ordering-main--cart {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 24px;
        align-items: start;
    }

    .ordering-cart-panel {
        position: sticky;
        top: calc(var(--ordering-header-height) + 16px);
        display: block;
        max-height: calc(100dvh - var(--ordering-header-height) - 32px);
        overflow: auto;
        padding: 18px;
        border: 1px solid var(--portal-line);
        border-radius: var(--rp-radius, 20px);
        background: var(--portal-surface);
        box-shadow: 0 8px 24px rgb(0 0 0 / 6%);
    }

    .ordering-cart-bar {
        display: none !important;
    }
}

.ordering-cart-bar {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(calc(100% - 32px), 520px);
    min-height: 54px;
    padding: 0 18px 0 10px;
    border: 0;
    border-radius: 999px;
    background: var(--portal-violet);
    color: var(--portal-on-violet);
    font: inherit;
    box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
    transform: translateX(-50%);
    cursor: pointer;
}

.ordering-cart-bar span:nth-child(2) {
    flex: 1;
    text-align: left;
    font-weight: 500;
}

.ordering-cart-bar__count {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(255 255 255 / 22%);
    font-weight: 600;
}

.ordering-cart__title {
    margin: 0 44px 12px 0;
    font-family: var(--rp-font-display, inherit);
    font-size: 18px;
    font-weight: 600;
}

.ordering-cart-panel .ordering-cart__title {
    margin-right: 0;
}

.ordering-cart__rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ordering-cart__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--portal-line);
}

.ordering-cart__name {
    display: flex;
    flex-direction: column;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
}

.ordering-cart__name small {
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 400;
}

.ordering-cart__price {
    min-width: 72px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.ordering-cart__total,
.ordering-checkout__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 14px 0;
    font-size: 15px;
}

.ordering-cart__total strong,
.ordering-checkout__total strong {
    color: var(--rp-primary, var(--portal-ink));
    font-size: 20px;
}

.ordering-cart__go {
    width: 100%;
}

/* Checkout */
.ordering-checkout__section {
    padding: 12px 0;
    border-bottom: 1px solid var(--portal-line);
}

.ordering-checkout__change {
    color: var(--portal-violet);
    font-size: 12px;
}

.ordering-checkout__cards {
    margin-top: 10px;
}

.ordering-checkout__hint {
    margin: 12px 0 0;
}

.ordering-account.portal-section {
    height: auto;
    overflow: visible;
}

.ordering-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ordering-choice__item {
    flex: 1 1 120px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.ordering-choice__item.is-selected {
    border-color: var(--portal-violet);
    background: var(--portal-violet-soft);
    font-weight: 600;
}

.ordering-choice__item:disabled {
    opacity: .45;
    cursor: default;
}

.ordering-field {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

.ordering-field--column {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.ordering-field select,
.ordering-field input,
.ordering-field textarea {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: inherit;
    font-size: 14px;
}

.ordering-field textarea {
    resize: vertical;
}

.ordering-addresses {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ordering-address {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: inherit;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.ordering-address span {
    color: var(--portal-muted);
    font-size: 13px;
}

.ordering-address.is-selected {
    border-color: var(--portal-violet);
    background: var(--portal-violet-soft);
}

.ordering-link {
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--portal-violet);
    font: inherit;
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

/* Confirmation */
.ordering-confirmation {
    text-align: center;
}

.ordering-confirmation__mark {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: var(--portal-violet-soft);
}

.ordering-confirmation__mark svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: var(--portal-violet);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ordering-confirmation .ordering-layer__title {
    margin-right: 0;
}

.ordering-confirmation__code {
    margin: 0 0 16px;
    font-size: 15px;
}

.ordering-confirmation__code strong {
    margin-left: 6px;
    font-size: 20px;
    letter-spacing: .08em;
}

.ordering-confirmation__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.ordering-confirmation__actions .ordering-button {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.ordering-confirmation__account {
    margin-top: 18px;
}

/* Open orders: bottom left, a way back to the order's page */
.ordering-open-orders {
    position: fixed;
    left: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 35;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: min(calc(100% - 32px), 300px);
    padding: 10px;
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    background: var(--portal-surface);
    box-shadow: 0 10px 28px rgb(0 0 0 / 14%);
}

@media (max-width: 999px) {
    .ordering-open-orders--raised {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }
}

.ordering-open-orders__title {
    margin: 0 4px 2px;
    color: var(--portal-muted);
    font-size: 12px;
    font-weight: 600;
}

.ordering-open-orders__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 10px;
    color: var(--portal-ink);
    font-size: 14px;
    text-decoration: none;
}

.ordering-open-orders__item:hover,
.ordering-open-orders__item:focus-visible {
    background: var(--portal-violet-soft);
}

.ordering-open-orders__code {
    font-weight: 600;
    letter-spacing: .05em;
}

.ordering-open-orders__status {
    margin-left: auto;
    color: var(--portal-muted);
    font-size: 13px;
}

.ordering-open-orders__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--portal-violet);
    animation: ordering-pulse 1.6s ease-in-out infinite;
}

.ordering-open-orders__dot--done {
    background: #26b050;
    animation: none;
}

@keyframes ordering-pulse {
    50% { opacity: .35; }
}

@media (prefers-reduced-motion: reduce) {
    .ordering-open-orders__dot {
        animation: none;
    }
}

/* On phones the basket bar takes the bottom: messages appear above it. */
@media (max-width: 999px) {
    .ordering-toast {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }
}

/* The page always has its own background: a browser in dark mode must not show through. */
html:has(.ordering-page),
html:has(.ordering-page) body {
    color-scheme: light;
    background: var(--rp-background, #F7F6FB);
}
