/* The frame of /Portal: navigation and sections. Everything inside a section keeps its own styles. */

:root {
    --portal-violet: var(--rp-primary, #5E17EB);
    --portal-violet-soft: color-mix(in srgb, var(--rp-primary, #5E17EB) 11%, var(--rp-surface, #fff));
    --portal-deep: color-mix(in srgb, var(--rp-primary, #431099) 82%, #000);
    --portal-on-violet: var(--rp-primary-text, #fff);
    --portal-surface: var(--rp-surface, #fff);
    --portal-ink: var(--rp-text, #1F1B2E);
    --portal-muted: var(--rp-muted, #6B6680);
    --portal-line: var(--rp-line, #ECE8F5);
    --portal-nav-height: 64px;
    --portal-rail-width: 116px;
}

/* On html: a restaurant's theme paints the body, and that must win. */
html:has(.portal-shell) {
    background: var(--portal-surface);
    overscroll-behavior-y: none;
}

.portal-shell {
    height: 100dvh;
    width: 100%;
    overflow: hidden;
}

.portal-main {
    height: calc(100dvh - var(--portal-nav-height) - env(safe-area-inset-bottom));
    width: 100%;
}

.portal-section {
    height: 100%;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: portal-section-in .16s ease-out;
}

.portal-section[hidden] {
    display: none;
}

@keyframes portal-section-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* The navigation belongs to MyDinner: on a restaurant's page only its icons take the restaurant's colour. */
.portal-nav {
    --rp-font-body: Poppins;
    --portal-violet: #5E17EB;
    --portal-violet-soft: #F1ECFF;
    --portal-surface: #fff;
    --portal-ink: #1F1B2E;
    --portal-muted: #6B6680;
    --portal-line: #ECE8F5;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 20;
    display: flex;
    height: calc(var(--portal-nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--portal-surface);
    border-top: 1px solid var(--portal-line);
}

.portal-nav__logo {
    display: none;
}

.portal-nav__items {
    display: flex;
    flex: 1;
    align-items: stretch;
    justify-content: space-around;
    max-width: 560px;
    margin: 0 auto;
}

.portal-nav__item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px 4px;
    border: 0;
    background: none;
    color: var(--portal-muted);
    font: 500 11px/1.2 var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .15s ease;
}

.portal-nav__icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 30px;
    border-radius: 15px;
    color: var(--rp-primary, currentColor);
    transition: background-color .15s ease;
}

.portal-nav__icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.portal-nav__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Five labels fit a phone only if each takes what it needs. */
.portal-nav__items:has(> :nth-child(5)) .portal-nav__item {
    flex: 1 1 auto;
    font-size: 10px;
}

.portal-nav__item.is-active {
    color: var(--portal-violet);
    font-weight: 600;
}

.portal-nav__item.is-active .portal-nav__icon {
    background: var(--rp-nav-soft, var(--portal-violet-soft));
}

.portal-nav__item:focus-visible {
    outline: 2px solid var(--portal-violet);
    outline-offset: -3px;
    border-radius: 12px;
}

.portal-nav__dot {
    position: absolute;
    top: 2px;
    right: 12px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #D92D20;
    box-shadow: 0 0 0 2px #fff;
}

@media (hover: hover) {
    .portal-nav__item:hover {
        color: var(--portal-violet);
    }
}

/* The width where the restaurant view gets its two columns: their margins expect this rail. */
@media (min-width: 1300px) {
    .portal-main {
        height: 100dvh;
    }

    .portal-nav {
        inset: 0 auto 0 0;
        width: var(--portal-rail-width);
        height: auto;
        flex-direction: column;
        align-items: center;
        padding: 28px 0;
        border-top: 0;
        border-right: 1px solid var(--portal-line);
    }

    .portal-nav__logo {
        display: block;
        width: 52px;
        height: 52px;
        margin-bottom: 36px;
    }

    .portal-nav__items {
        flex: 0;
        flex-direction: column;
        gap: 14px;
        margin: 0;
        width: 100%;
    }

    .portal-nav__item {
        flex: none;
        gap: 4px;
        padding: 8px 4px;
    }
}

/* Shared by the pages of the portal */

.portal-page {
    box-sizing: border-box;
    width: min(680px, 100%);
    margin-inline: auto;
    padding: 20px 16px 32px;
    color: var(--portal-ink);
    font-family: var(--rp-font-body, Poppins), sans-serif;
}

.portal-page__title {
    margin: 0 0 16px;
    color: var(--portal-ink);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.portal-button {
    min-height: 46px;
    padding: 0 24px;
    border: 0;
    border-radius: 14px;
    background: var(--portal-violet);
    color: var(--portal-on-violet);
    font: 600 15px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
    transition: background-color .15s ease;
}

.portal-button:hover {
    background: var(--portal-deep);
}

.portal-button:focus-visible,
.portal-segments__item:focus-visible,
.order-card__head:focus-visible {
    outline: 2px solid var(--portal-violet);
    outline-offset: 2px;
}

.portal-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 56px 16px;
    text-align: center;
}

.portal-empty--small {
    padding-block: 40px;
}

.portal-empty__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.portal-empty__text {
    max-width: 320px;
    margin: 0 0 12px;
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.5;
}

.portal-segments {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 4px;
    border-radius: 14px;
    background: #F5F3FA;
}

.portal-segments__item {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: none;
    color: var(--portal-muted);
    font: 500 14px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.portal-segments__item.is-active {
    background: var(--portal-surface);
    color: var(--portal-violet);
    font-weight: 600;
    box-shadow: 0 1px 3px rgb(38 11 126 / 12%);
}

.portal-segments__count {
    min-width: 20px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--portal-violet);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
}

.portal-avatar {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 14px;
    background: var(--portal-violet-soft);
    color: var(--portal-violet);
    font-size: 18px;
    font-weight: 600;
}

.portal-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--portal-surface);
}

/* Start */

#language-selector-container {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 15;
}

.portal-language {
    position: relative;
}

.portal-language summary {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: var(--portal-surface);
    color: var(--portal-violet);
    font: 600 13px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
    list-style: none;
}

.portal-language summary::-webkit-details-marker {
    display: none;
}

.portal-language__menu {
    position: absolute;
    top: 42px;
    right: 0;
    display: flex;
    flex-direction: column;
    min-width: 190px;
    padding: 6px;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: var(--portal-surface);
    box-shadow: 0 8px 24px rgb(38 11 126 / 14%);
}

.portal-language__menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--portal-ink);
    font: 500 14px var(--rp-font-body, Poppins), sans-serif;
    text-align: left;
    cursor: pointer;
}

.portal-language__menu button:hover {
    background: var(--portal-violet-soft);
}

.portal-home {
    box-sizing: border-box;
    width: min(800px, 100%);
    margin-inline: auto;
    padding: 12px 12px 24px;
    font-family: var(--rp-font-body, Poppins), sans-serif;
}

.portal-start {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: min(560px, 74dvh);
    width: min(500px, 100%);
    margin-inline: auto;
    padding-inline: 4px;
}

.portal-start__logo {
    align-self: flex-start;
    height: 30px;
    width: auto;
    margin-bottom: 28px;
}

.portal-start__title {
    margin: 0;
    color: var(--portal-deep);
    font-size: clamp(30px, 8.5vw, 40px);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.12;
}

.portal-start__text {
    margin: 10px 0 24px;
    color: var(--portal-muted);
    font-size: 15px;
    line-height: 1.5;
}

.portal-start__search {
    display: flex;
    gap: 10px;
}

.portal-search {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding-left: 14px;
    border: 1.5px solid transparent;
    border-radius: 16px;
    background: var(--portal-violet-soft);
    transition: border-color .15s ease, background-color .15s ease;
}

.portal-search:focus-within {
    border-color: var(--portal-violet);
    background: var(--portal-surface);
}

.portal-search .e-input-group,
.portal-search .e-input-group.e-control-wrapper {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.portal-search input.e-input {
    padding: 0 !important;
    background: transparent !important;
    color: var(--portal-ink) !important;
    font: 500 16px var(--rp-font-body, Poppins), sans-serif !important;
}

.portal-search__go {
    flex: none;
    width: 44px;
    height: 100%;
    border: 0;
    background: none;
    cursor: pointer;
}

.portal-search__filter {
    flex: none;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 16px;
    background: var(--portal-violet-soft);
    cursor: pointer;
}

.portal-start__hint {
    margin: 12px 2px 0;
    color: #B42318;
    font-size: 14px;
}

.portal-start__places {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.portal-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid var(--portal-line);
    border-radius: 20px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: 500 14px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
}

.portal-chip:hover {
    border-color: var(--portal-violet);
}

.portal-skeletons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
}

.portal-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--portal-line);
    border-radius: 16px;
}

.portal-skeleton span {
    height: 12px;
    width: 45%;
    border-radius: 6px;
    background: linear-gradient(90deg, #F1EEF8 25%, #FAF8FF 50%, #F1EEF8 75%);
    background-size: 200% 100%;
    animation: portal-shimmer 1.2s linear infinite;
}

.portal-skeleton span:first-child {
    height: 16px;
    width: 65%;
}

.portal-skeleton span:last-child {
    width: 80%;
}

@keyframes portal-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* Orders */

.order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.portal-button--quiet {
    border: 1px solid var(--portal-line);
    background: var(--portal-surface);
    color: var(--portal-violet);
}

.portal-button--quiet:hover:not(:disabled) {
    border-color: var(--portal-violet);
    background: var(--portal-surface);
}

.portal-button--quiet:disabled {
    color: var(--portal-muted);
    cursor: default;
}

.order-list__older {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.order-list__problem {
    margin: 0;
    color: var(--portal-muted);
    font-size: 14px;
}

.order-card {
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    background: var(--portal-surface);
    transition: border-color .15s ease;
}

.order-card.is-open {
    border-color: #CFC3F5;
}

.order-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 16px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.order-card__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.order-card__name {
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-card__items,
.order-card__date {
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-card__date {
    font-size: 12px;
}

.order-card__side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.order-card__total {
    font-size: 15px;
    font-weight: 600;
}

.order-status {
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

.order-status--active {
    background: var(--portal-violet-soft);
    color: var(--portal-violet);
}

.order-status--done {
    background: #E7F6EC;
    color: #17703A;
}

.order-status--cancelled {
    background: #FDECEA;
    color: #B42318;
}

.order-card__details {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 16px;
    margin: 0 12px;
    padding: 12px 0 14px;
    border-top: 1px solid var(--portal-line);
    font-size: 13px;
}

.order-lines {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.7;
}

.order-facts {
    min-width: 0;
    margin: 0;
    color: var(--portal-muted);
    font-size: 12px;
}

.order-facts dd {
    margin: 0 0 8px;
    color: var(--portal-ink);
    font-size: 13px;
}

.order-facts dd:last-child {
    margin-bottom: 0;
}

.portal-qr {
    display: block;
    width: 104px;
    height: 104px;
}

.portal-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

.order-card__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--portal-violet);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

/* Reservations share the cards of the orders */

.order-card.needs-answer {
    border-color: #F2C879;
}

.reservation-status {
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--portal-violet-soft);
    color: var(--portal-violet);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    text-align: right;
}

.reservation-status--needsanswer {
    background: #FEF3DC;
    color: #8A5300;
}

.reservation-status--confirmed {
    background: #E7F6EC;
    color: #17703A;
}

.reservation-status--rejected {
    background: #FDECEA;
    color: #B42318;
}

.reservation-status--past {
    background: #F1F0F5;
    color: var(--portal-muted);
}

.reservation-proposal {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: #FEF8EA;
}

.reservation-proposal p {
    margin: 0;
    font-weight: 500;
}

.reservation-proposal .reservation-proposal__note {
    color: var(--portal-muted);
    font-weight: 400;
}

.portal-button--link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.portal-button--link:hover {
    color: #fff;
}

/* Restaurant */

#restaurant-selected-container {
    position: relative;
}

.restaurant-language {
    position: absolute;
    top: 14px;
    right: 58px;
    z-index: 4;
}

.restaurant-language--alone {
    right: 16px;
}

.restaurant-view-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

#restaurant-details-logo + .restaurant-details-initial {
    display: none;
}

.restaurant-details-initial {
    color: var(--rp-primary, var(--portal-violet));
    font-size: 48px;
    font-weight: 600;
}

.restaurant-eta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    color: var(--rp-muted, var(--portal-muted));
    font-size: 13px;
    font-weight: 500;
}

.portal-section .category-container {
    flex: none;
    height: auto;
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--rp-text, var(--portal-ink));
    font-family: inherit;
    cursor: pointer;
}

.portal-section .category-container img {
    border-radius: 50%;
    object-fit: cover;
}

.portal-section .category-container span {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-section .category-container.is-selected img {
    outline: 2px solid var(--rp-primary, var(--portal-violet));
    outline-offset: 1px;
}

.portal-section .category-container.is-selected span {
    color: var(--rp-primary, var(--portal-violet));
    font-weight: 600;
}

.portal-section .category-container:focus-visible,
.portal-section .product-container:focus-visible {
    outline: 2px solid var(--portal-violet);
    outline-offset: 2px;
}

.portal-section .product-container {
    box-sizing: border-box;
    border: var(--rp-border, 1px) solid var(--rp-line, var(--portal-line));
    box-shadow: var(--rp-shadow, none);
    background: var(--rp-surface, #fff);
    cursor: pointer;
    transition: border-color .15s ease;
}

@media (hover: hover) {
    .portal-section .product-container:hover {
        border-color: var(--rp-primary, var(--portal-violet));
    }
}

.product-photos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.product-photos:empty {
    display: none;
}

.portal-section .product-container .product-name {
    width: 100%;
    color: var(--rp-text, var(--portal-ink));
    text-align: left;
    hyphens: none;
    overflow-wrap: anywhere;
}

.portal-section .product-container .product-description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 2px;
    color: var(--rp-muted, var(--portal-muted));
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    hyphens: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.portal-section .product-details {
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
}

.portal-section .product-details .add-button,
.portal-section .product-details .product-price {
    align-self: center;
}

.portal-section .product-details .product-price {
    margin-left: auto;
    color: var(--rp-primary, var(--portal-violet));
    font-weight: 600;
    white-space: nowrap;
}

.portal-section .add-button {
    flex: none;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--rp-primary, #5E17EB) 11%, var(--rp-surface, #fff));
    color: var(--rp-primary, var(--portal-violet));
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.portal-section .add-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (hover: hover) {
    .portal-section .product-container:hover .add-button {
        background: var(--rp-primary, var(--portal-violet));
        color: var(--rp-primary-text, #fff);
    }
}

/* A name is only a line to read: a phone shows such products as rows, with room for long names. */
@media (max-width: 599px) {
    .portal-section .product-grid {
        box-sizing: border-box;
        width: 100%;
        gap: 8px;
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-section .product-grid .product-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        width: auto;
        padding: 12px;
    }

    .portal-section .product-grid .product-name,
    .portal-section .product-grid .product-description {
        grid-column: 1;
    }

    .portal-section .product-grid .product-details {
        gap: 10px;
        grid-column: 2;
        grid-row: 1 / span 2;
        width: auto;
        margin-top: 0;
        padding-top: 0;
    }
}

/* One column: the page scrolls, not a box inside it, and the categories stay in reach. From the rail on, the menu is its own column. */
@media (max-width: 1299px) {
    .portal-section .restaurant-categories-container {
        position: sticky;
        top: 0;
        z-index: 3;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        margin-top: 12px;
        padding: 8px 12px;
        background: var(--rp-background, #fff);
        scrollbar-width: none;
    }

    .portal-section .restaurant-categories-container::-webkit-scrollbar {
        display: none;
    }

    .portal-section .category-container img {
        width: 48px;
        height: 48px;
    }

    .portal-section .products-container {
        box-sizing: border-box;
        height: auto;
        max-height: none;
        margin-top: 4px;
        margin-bottom: 16px;
        overflow: visible;
    }
}

@media (min-width: 1300px) {
    .portal-section #restaurant-selected-container-right {
        flex: 1 1 0;
        box-sizing: border-box;
        width: auto;
        min-width: 0;
        padding-top: 60px;
    }

    .portal-section .products-container {
        box-sizing: border-box;
    }

    .restaurant-language,
    .restaurant-language--alone {
        right: 24px;
    }
}

/* Account. The ids carry the component's own styles, so these rules go through the section. */

.portal-section #loginWindow {
    position: static;
    transform: none;
    box-sizing: border-box;
    width: min(460px, 100%);
    max-height: none;
    margin-inline: auto;
    padding: 0;
    overflow: visible;
    font-family: var(--rp-font-body, Poppins), sans-serif;
}

.portal-section #loginWindowImage {
    height: 150px;
    background-position: center 30%;
}

.portal-section #loginWindowContent {
    padding: 20px 16px 28px;
}

.portal-section #loginButton {
    min-height: 48px;
    border-radius: 14px;
    background: var(--portal-violet);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.login-link {
    align-self: flex-start;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--portal-violet);
    font: 500 13px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
}

.login-link--strong {
    font-weight: 600;
}

.login-error {
    color: #B42318;
    font-size: 13px;
    line-height: 1.4;
}

.portal-section #ahap {
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.portal-section #ahap p {
    margin: 0;
}

.portal-section #profileManagementContent {
    box-sizing: border-box;
    width: min(680px, 100%);
    margin-inline: auto;
    padding: 20px 16px 32px;
    font-family: var(--rp-font-body, Poppins), sans-serif;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.profile-top .portal-page__title {
    flex: 1;
    margin: 0;
}

.profile-top__back {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: -8px;
    border: 0;
    background: none;
    cursor: pointer;
}

.profile-top__logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: var(--portal-surface);
    color: var(--portal-ink);
    font: 500 13px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
}

.portal-section #profile-info-container {
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    background: var(--portal-violet-soft);
}

.profile-card__picture {
    position: relative;
    flex: none;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: var(--portal-violet);
    color: #fff;
    font: 600 26px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
}

.profile-card__picture > img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
}

.profile-card__camera {
    position: absolute;
    right: -5px;
    bottom: -5px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
}

.profile-card__camera img {
    width: 100%;
    height: 100%;
}

.profile-card__text {
    min-width: 0;
}

.profile-card__name,
.profile-card__mail {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-card__name {
    color: var(--portal-ink);
    font-size: 17px;
    font-weight: 600;
}

.profile-card__mail {
    color: var(--portal-muted);
    font-size: 13px;
}

.portal-section #UserOptionsContainer {
    min-height: 0;
    max-height: none;
    margin-top: 16px;
    padding-bottom: 8px;
    overflow: visible;
}

.portal-section #UserOptionsContainer .content-container {
    position: static;
    overflow: visible;
    background: none;
    transform: none;
    transition: none;
}

.portal-section #UserOptionsContainer .main-content-hidden,
.portal-section #UserOptionsContainer .address-content-hidden {
    display: none;
}

.portal-section .profile-section-toggle {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 54px;
    margin: 0 0 8px !important;
    padding: 8px 6px 8px 14px;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: var(--portal-surface);
    box-shadow: none;
    color: var(--portal-ink);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

@media (min-width: 1300px) {
    .portal-page,
    .portal-section #profileManagementContent {
        margin-left: max(var(--portal-rail-width), calc(50% - 340px));
    }

    .portal-section #loginWindow {
        margin-left: max(var(--portal-rail-width), calc(50% - 230px));
    }

    #cart-widget-dialog {
        left: calc(var(--portal-rail-width) + 12px) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-section,
    .portal-skeleton span {
        animation: none;
    }

    .portal-nav__item,
    .portal-nav__icon {
        transition: none;
    }
}


/* An icon in the restaurant's colour: the file only gives the shape. */
.portal-icon {
    display: inline-block;
    flex: none;
    width: var(--portal-icon-size, 20px);
    height: var(--portal-icon-size, 20px);
    background-color: var(--rp-primary, var(--portal-violet));
    -webkit-mask: var(--portal-icon) center / contain no-repeat;
    mask: var(--portal-icon) center / contain no-repeat;
}

.restaurant-favorite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--rp-surface, #fff) 80%, transparent);
    cursor: pointer;
}

/* What the place offers: an icon, and its name on demand, so a long list is never cut. */
.restaurant-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    margin-block: 6px;
}

.restaurant-service {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 30px;
    padding-inline: 7px;
    border: 1px solid color-mix(in srgb, var(--rp-primary, #5E17EB) 28%, transparent);
    border-radius: 999px;
    background: var(--rp-surface, #fff);
    box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
    cursor: help;
    transition: border-color .2s ease, background-color .2s ease;
}

.restaurant-service:hover,
.restaurant-service:focus {
    border-color: var(--rp-primary, var(--portal-violet));
    background: color-mix(in srgb, var(--rp-primary, #5E17EB) 8%, var(--rp-surface, #fff));
}

.restaurant-service__label {
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    color: var(--rp-text, var(--portal-ink));
    font-size: 12px;
    white-space: nowrap;
    hyphens: none;
    transition: max-width .28s ease, margin-left .28s ease, opacity .2s ease;
}

.restaurant-service:hover .restaurant-service__label,
.restaurant-service:focus .restaurant-service__label {
    max-width: 240px;
    margin-left: 6px;
    opacity: 1;
}

.restaurant-service:focus-visible {
    outline: 2px solid var(--rp-primary, var(--portal-violet));
    outline-offset: 1px;
}

/* Dialogs of the portal */
.portal-dialog.e-dialog {
    overflow: hidden;
    max-height: 94dvh !important;
    border: 0;
    border-radius: min(var(--rp-radius, 18px), 24px);
    background: var(--rp-surface, #fff);
    color: var(--rp-text, var(--portal-ink));
    font-family: var(--rp-font-body, Poppins), sans-serif;
}

.portal-dialog.e-dialog .e-dlg-header-content {
    padding: 16px 20px 12px;
    border: 0;
    background: transparent;
}

.portal-dialog.e-dialog .e-dlg-header {
    width: calc(100% - 32px);
    color: inherit;
    font-family: var(--rp-font-display, inherit);
    font-size: 17px;
    font-weight: 600;
}

.portal-dialog.e-dialog .e-dlg-content {
    padding: 0 20px 18px;
    background: transparent;
    color: inherit;
}

.portal-dialog .e-input-group.e-input-focus:not(.e-success):not(.e-warning):not(.e-error),
.portal-dialog .e-float-input.e-input-focus {
    border-color: var(--rp-primary, var(--portal-violet)) !important;
    box-shadow: 0 0 0 1px var(--rp-primary, var(--portal-violet)) !important;
}

/* Gallery */
.gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery__stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    height: min(66dvh, 560px);
    border-radius: 12px;
    background: #15121c;
}

.gallery__backdrop {
    position: absolute;
    inset: -24px;
    width: calc(100% + 48px);
    height: calc(100% + 48px);
    object-fit: cover;
    opacity: .55;
    filter: blur(22px);
}

.gallery__picture {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery__arrow {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--rp-surface, #fff);
    color: var(--rp-primary, var(--portal-violet));
    box-shadow: 0 2px 10px rgb(0 0 0 / 28%);
    cursor: pointer;
    transform: translateY(-50%);
}

.gallery__arrow svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery__arrow--previous { left: 12px; }
.gallery__arrow--next { right: 12px; }

.gallery__count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgb(0 0 0 / 55%);
    color: #fff;
    font-size: 12px;
}

.gallery__empty {
    margin: 0;
    color: #fff;
}

.gallery__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
}

.gallery__thumb {
    flex: none;
    overflow: hidden;
    width: 72px;
    height: 54px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: none;
    opacity: .65;
    cursor: pointer;
    transition: opacity .15s ease, border-color .15s ease;
}

.gallery__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__thumb.is-selected,
.gallery__thumb:hover {
    opacity: 1;
}

.gallery__thumb.is-selected {
    border-color: var(--rp-primary, var(--portal-violet));
}

/* Reservation */
.reservation-head {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.reservation-head small {
    color: var(--rp-muted, var(--portal-muted));
    font-size: 12px;
    font-weight: 500;
}

.reservation-head strong {
    overflow: hidden;
    color: var(--rp-primary, var(--portal-violet));
    font-family: var(--rp-font-display, inherit);
    font-size: 19px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reservation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.reservation-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.reservation-field--wide {
    grid-column: 1 / -1;
}

.reservation-field label {
    color: var(--rp-muted, var(--portal-muted));
    font-size: 12px;
    font-weight: 500;
}

.reservation-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.reservation-cancel {
    padding: 8px 6px;
    border: 0;
    background: none;
    color: var(--rp-muted, var(--portal-muted));
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
}

@media (max-width: 420px) {
    .reservation-grid {
        gap: 10px;
    }

    .gallery__stage {
        height: 52dvh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .restaurant-service__label,
    .gallery__thumb {
        transition: none;
    }
}

.portal-section #delivery-tipe-indicator {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    max-width: 340px;
    margin: 0 auto 10px;
    padding: 6px 22px;
    border-radius: 999px;
    background: var(--rp-accent, var(--portal-violet));
    color: var(--rp-accent-text, #fff);
    font-size: 13px;
    font-weight: 500;
}

#restaurant-selected-container-left-desktop::-webkit-scrollbar-track {
    background: transparent;
}

#restaurant-selected-container-left-desktop::-webkit-scrollbar-thumb {
    border-color: transparent;
    background: color-mix(in srgb, var(--rp-primary, #5E17EB) 35%, transparent);
    background-clip: padding-box;
}

/* Wide screens: lists use the width, and the account is one panel with nothing to open. */
.account-panel + .account-panel {
    margin-top: 0;
}

@media (min-width: 1000px) {
    .portal-page--wide {
        width: min(1120px, 100%);
    }

    .portal-page--wide .portal-segments {
        max-width: 420px;
    }

    .portal-page--wide .order-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        align-items: start;
    }

    .portal-page--wide .order-list > * {
        margin: 0;
    }

    .portal-page--wide .order-list__older {
        grid-column: 1 / -1;
    }

    .portal-section #profileManagementContent.account--dashboard {
        width: min(1120px, 100%);
    }

    .account--dashboard #UserOptionsContainer,
    .account--dashboard .content-container {
        width: 100%;
        max-width: none;
    }

    .account--dashboard .main-content-visible {
        columns: 2;
        column-gap: 16px;
    }

    .account--dashboard .account-panel {
        break-inside: avoid;
        margin-bottom: 16px;
        padding: 14px 16px 16px;
        border: var(--rp-border, 1px) solid var(--portal-line);
        border-radius: min(var(--rp-radius, 16px), 20px);
        background: var(--portal-surface);
        box-shadow: var(--rp-shadow, none);
    }

    .portal-section .account--dashboard .profile-section-toggle {
        min-height: 0;
        margin: 0 0 10px !important;
        padding: 0;
        border: 0;
        background: none;
        color: var(--rp-primary, var(--portal-violet));
        font-family: var(--rp-font-display, inherit);
        font-size: 15px;
        font-weight: 600;
        cursor: default;
        pointer-events: none;
    }

    .account--dashboard .profile-section-toggle .arrow {
        display: none;
    }

    .account--dashboard .toggle-content {
        overflow: visible;
        max-height: none;
    }
}

@media (min-width: 1000px) and (max-width: 1299px) {
    .account--dashboard .main-content-visible {
        column-gap: 12px;
    }
}

@media (min-width: 1300px) {
    .portal-page--wide,
    .portal-section #profileManagementContent.account--dashboard {
        margin-left: max(var(--portal-rail-width), calc(50% - 560px));
    }
}

@media (min-width: 1700px) {
    .portal-page--wide .order-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Inside a restaurant's own website: only the ordering page, the site around it is the rest. */
.portal-shell--embedded .portal-main {
    height: 100dvh;
    margin: 0;
}

.portal-shell--embedded #restaurant-selected-container-left,
.portal-shell--embedded #restaurant-selected-container-left-desktop {
    display: none;
}

.portal-shell--embedded .portal-section #restaurant-selected-container-right {
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
    padding-top: 12px;
}

.portal-shell--embedded .portal-page,
.portal-shell--embedded .portal-section #profileManagementContent,
.portal-shell--embedded .portal-section #loginWindow {
    margin-left: auto;
}

.portal-embed-back {
    display: block;
    margin: 12px auto 0;
    padding: 6px 14px;
    border: 0;
    border-radius: 999px;
    background: var(--portal-violet-soft);
    color: var(--portal-violet);
    font: 500 13px var(--rp-font-body, Poppins), sans-serif;
    cursor: pointer;
}

.portal-shell--embedded .portal-section .restaurant-categories-container {
    justify-content: center;
    margin-inline: auto;
}

@media (min-width: 1000px) {
    .portal-section #loginWindow:has(.account--dashboard) {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .account--dashboard .toggle-content > div {
        width: 100%;
    }
}

/* Rating: the star and the number read as one */
.restaurant-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px 2px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rp-primary, #5E17EB) 10%, var(--rp-surface, #fff));
    color: var(--rp-text, var(--portal-ink));
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

/* Product dialog */
.product-dialog.e-dialog .e-dlg-header-content {
    padding: 0;
}

.product-dialog #product-header {
    border-radius: 0;
}

.product-dialog .e-dlg-content {
    padding-top: 16px !important;
}

.product-dialog__description,
.product-dialog__notes {
    margin: 4px 0 10px;
    color: var(--rp-muted, var(--portal-muted));
    font-size: 14px;
    line-height: 1.45;
}

.product-dialog__label {
    display: block;
    margin: 6px 0 4px;
    color: var(--rp-text, var(--portal-ink));
    font-size: 13px;
    font-weight: 600;
}

.product-dialog__options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(40dvh, 300px);
    margin-bottom: 12px;
    padding: 2px;
    overflow-y: auto;
}

.product-dialog #productOption {
    padding: 10px 12px;
    border: 1px solid var(--rp-line, var(--portal-line));
    border-radius: 12px;
    box-shadow: none;
}

.product-dialog__actions {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--rp-line, var(--portal-line));
    background: var(--rp-surface, #fff);
}

.product-dialog #productDetailsContent .product-dialog__close {
    width: auto;
    margin: 0;
    padding: 10px 14px;
    color: var(--rp-muted, var(--portal-muted));
    font-weight: 500;
}

.product-dialog #productDetailsContent .product-dialog__order {
    width: auto;
    margin: 0;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--rp-primary, var(--portal-violet));
    color: var(--rp-primary-text, #fff);
}

@media (min-width: 700px) {
    .product-dialog #product-header {
        height: 260px !important;
    }
}
