@import url('llmChat.css');

:root {
    --background-color: #f4f4f4;
    --main-color: #333;
    --button-color: #888888;
    --selected-color: #88888888;
    --font-color-inverted: #f4f4f4;
    --font-color-default: #333;
    --attenuated-color: #666;
    --help-ring-color: #e00;
    /* Order/session state colors (state value → color), shared across admin,
       service and viewer. */
    --state-active-color: #ff9800;
    --state-ordered-color: #4caf50;
    --state-finished-color: #88b4ba;
    /* Per-item order state colors (informational, staff-only). */
    --item-preparing-color: var(--state-active-color);
    /* orange */
    --item-delivered-color: var(--state-ordered-color);
    /* green */
    --item-cancelled-color: #555;
    /* dark grey */
    --item-return-color: var(--help-ring-color);
    /* red */
    /* Light tints of the above, used as the item row background. */
    --item-preparing-bg: #fdebd3;
    --item-delivered-bg: #e3f3e4;
    --item-cancelled-bg: #ececec;
    --item-return-bg: #f9e0e0;
}


body {
    font-family: sans-serif;
    margin: 0;
    background-color: var(--background-color);
}

a {
    color: var(--button-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease-in-out;
}

a:hover {
    color: var(--button-color);
}

header {
    background-color: var(--main-color);
    color: white;
    padding: 0.2rem;
    padding-bottom: 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
    transition: padding 0.3s ease-in-out, font-size 0.3s ease-in-out;
}

header.header-shrunk {
    padding-bottom: 1px;
}

#group-nav-wrapper {
    position: relative;
    overflow: hidden;
    background-color: var(--main-color);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

#group-nav-wrapper::before,
#group-nav-wrapper::after {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3.5rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
    z-index: 2;
    display: flex;
    align-items: center;
    color: var(--font-color-inverted);
    font-size: 1.3em;
    font-weight: bold;
}

#group-nav-wrapper::before {
    content: '‹';
    left: 0;
    background: linear-gradient(to right, var(--main-color) 40%, transparent);
    justify-content: flex-start;
    padding-left: 0.4rem;
}

#group-nav-wrapper::after {
    content: '›';
    right: 0;
    background: linear-gradient(to left, var(--main-color) 40%, transparent);
    justify-content: flex-end;
    padding-right: 0.4rem;
}

#group-nav-wrapper.can-scroll-left::before {
    opacity: 1;
}

#group-nav-wrapper.can-scroll-right::after {
    opacity: 1;
}

#group-nav {
    overflow-x: auto;
    gap: 0;
    padding: 0 0;
    scrollbar-width: none;
}

#group-nav::-webkit-scrollbar {
    display: none;
}

#group-nav button {
    background: transparent;
    color: var(--font-color-inverted);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid transparent;
    padding: 0.5rem 1rem;
    cursor: pointer;
    white-space: nowrap;
    text-transform: capitalize;
    font-size: 1em;
    opacity: 0.65;
    transition: opacity 0.2s, border-bottom-color 0.2s;
    line-height: 1em;
}

#group-nav button:hover {
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

#group-nav button.active {
    opacity: 1;
    border-bottom-color: var(--font-color-inverted);
}

header.header-shrunk h1 {
    /* font-size: 1.2rem; */
}

h1 {
    font-size: 1.4rem;
}

footer {
    background-color: var(--main-color);
    color: white;
    padding: 1rem;
    text-align: center;
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 10;
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    width: 100%;
    height: 100%;
    border: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.modal-with-padding {
    padding: 1rem;
}

.modal-description {
    padding-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0 0.75rem;
    line-height: 1.4;
}


#filter-options {
    flex-grow: 1;
    overflow-y: auto;
    font-size: 80%;
    text-transform: capitalize;
}



#apply-filters,
#reset-filters {
    padding: 1rem;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
    /* Make buttons fill width */
}

#apply-filters {
    background-color: var(--main-color);
}

#reset-filters {
    background-color: #6c757d;
}

.filter-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

#open-filters {
    position: fixed;
    bottom: 1rem;
    left: 0.5rem;
    width: fit-content;
    padding: 1rem;
    background-color: var(--main-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#split-bar {
    position: fixed;
    bottom: 1rem;
    left: 0.5rem;
    display: none;
    align-items: center;
    gap: 0.5rem;
}

#open-split {
    width: fit-content;
    padding: 1rem;
    background-color: var(--button-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    line-height: 0.75rem;
    width: 90px;
}

#open-qr {
    width: fit-content;
    padding: 1rem;
    border: 1px solid var(--attenuated-color) !important;
    background-color: var(--background-color);
    color: grey;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 2rem;
    line-height: 0.75rem;
}

.split-person-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.3rem 0 0.2rem 0;
}

.split-person-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8em;
    color: #333;
}

.split-person-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.4rem 0;
}

.split-person-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 1.5em;
    flex: 1;
}

.split-remove-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 1.8rem;
    height: 1.8rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
}

#split-add-person {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
}

#split-add-btn,
#split-assign-cancel,
#split-assign-confirm,
#split-modal-close {
    min-width: 30%;
    flex: 1 1 30%;
    padding: 1rem;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
}

#split-add-btn,
#split-assign-confirm {
    background-color: var(--main-color);
}

#split-assign-cancel,
#split-modal-close {
    background-color: #6c757d;
}

#split-name-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.split-totals {
    margin-top: 0.8rem;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
    font-size: 0.9em;
}

.split-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.split-total-badge {
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    font-size: 0.85em;
    color: #333;
}

.split-assign-person-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
}

.split-assign-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    width: 2.5rem;
}

.split-assign-checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
}

.split-assign-pill {
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.3rem 0.8rem;
    user-select: none;
}

.split-assign-all-row {
    margin-top: 0.3rem;
    padding-left: calc(2.5rem + 0.6rem);
}

.split-assign-all-pill {
    background-color: #ddd;
}

#menu-button {
    font-size: 1rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.2rem 0.2rem;
    background-color: white;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
}

#cart-preview {
    position: absolute;
    top: 1rem;
    width: fit-content;
    height: 1.3rem;
    right: 3.5rem;
    cursor: pointer;
    background-color: var(--attenuated-color);
    border: 1px solid var(--background-color);
    border-radius: 5px;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    display: flex;
    gap: 0.5rem;
    flex-direction: row;
    align-items: flex-end;
    line-height: 1.2;
}

#cart-preview-user {
    font-size: 0.7rem;
    font-weight: normal;
    opacity: 0.75;
    /* min-height: 0.85rem; */
}

#cart-preview-separator {
    /* font-size: 1rem; */
    font-weight: normal;
    opacity: 0.75;
}

.close-button {
    font-size: 1.5rem;
    position: absolute;
    align-items: center;
    justify-content: center;
    top: 1rem;
    right: 1rem;
    padding: 0.2rem 0.2rem;
    /* background-color: white; */
    color: var(--font-color-inverted);
    border: none;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
}


#menu-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.menu-list-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    cursor: pointer;
}

.menu-list-item:hover {
    background-color: #f0f0f0;
}


#menu-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 80px;
}

#menu-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.menu-item {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 0.5rem;
    position: relative;
}

/* Total always occupies its own full-width row at the end */
#menu-item-total {
    grid-column: 1 / -1;
}

.display_poster_fullwidth,
.display_poster_standard {
    border: none;
    background: transparent;
    padding: 0;
}

.display_poster_fullwidth {
    grid-column: 1 / -1;
}

.menu-item.display_poster_fullwidth img,
.menu-item.display_poster_standard img {
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}

.menu-item.display_poster_standard img {
    aspect-ratio: var(--menu-wh-ratio-poster-standard, 3);
}

.menu-item.display_poster_fullwidth img {
    aspect-ratio: var(--menu-wh-ratio-poster-fullwidth, 3);
}

.display_poster_fullwidth h3,
.display_poster_standard h3 {
    margin: 0.4rem 0 0.2rem;
}

.display_poster_fullwidth p,
.display_poster_standard p {
    margin: 0;
}

#font-size-controls {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

#font-size-controls button {
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 1rem;
    cursor: pointer;
}

.font-size-1 {
    font-size: 1rem;
}

.font-size-2 {
    font-size: 1.2rem;
}

.font-size-3 {
    font-size: 1.4rem;
}

.font-size-4 {
    font-size: 1.7rem;
}

.font-size-5 {
    font-size: 2rem;
}

#language-switcher {
    display: flex;
    gap: 0.5rem;
    padding-right: 2px;
}

#language-switcher.viewer-switcher button {
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
}

#language-switcher button {
    background-color: white;
    border: 1px solid var(--attenuated-color);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--font-color-default);
    transition: all 0.2s ease;
}

#language-switcher button.active {
    background-color: var(--main-color);
    color: var(--font-color-inverted);
    border-color: var(--main-color);
}

#language-switcher button:hover:not(.active) {
    background-color: #eee;
}

/* Language Selection Modal */
.language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    /* Above almost everything */
}

.language-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.language-modal-content h3 {
    margin-top: 0;
    text-align: center;
    color: var(--font-color-default);
}

.language-option-btn {
    padding: 1.2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid #eee;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--font-color-default);
    text-align: center;
}

.language-option-btn:hover {
    background: #f8f8f8;
    border-color: var(--main-color);
}

.language-option-btn.active {
    background: var(--main-color);
    color: white;
    border-color: var(--main-color);
}

.menu-item img {
    width: 100%;
    aspect-ratio: var(--menu-wh-ratio-default, 1.5);
    object-fit: cover;
    border-radius: 3px;
}

.filter-group {
    border: 1px solid #eee;
    padding: 0.5rem;
    border-radius: 5px;
}

.filter-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-reset-btn {
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
}

/* Pill-based filter styles */

.filter-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
    /* Ensure no interaction */
}

.pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background-color: #eee;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin: 0.2rem;
}

.filter-checkbox:checked+.pill {
    background-color: var(--main-color);
    color: white;
}

.item-tags {
    font-size: 0.5em;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
}

.tag-group {
    margin-bottom: 0.3rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.tag-label {
    font-weight: bold;
    margin-right: 0.5rem;
    color: var(--main-color);
}

.tag-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background-color: #eee;
    color: #333;
    margin: 0.1rem;
    white-space: nowrap;
    font-size: 0.8rem;
}

.group-separator {
    grid-column: 1 / -1;
    text-align: left;
    border-radius: 5px;
    padding: 1rem;
    margin: 0.5rem 0;
    font-weight: bold;
    color: var(--main-color);
    font-size: 1.2em;
    text-transform: capitalize;
    background-color: var(--main-color);
    color: var(--font-color-inverted);
}

.group-separator span {
    display: inline-block;
    position: relative;
}


.menu-item h3 {
    margin-top: 0;
    margin-bottom: 0;
}

.menu-item p {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.menu-item img {
    width: 100%;
    aspect-ratio: var(--menu-wh-ratio-default, 1.5);
    object-fit: cover;
    border-radius: 3px;
}

.modal {
    position: fixed;
    z-index: 20;
    /* Higher than header */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 0;
    padding: 1rem;
    width: 100%;
    height: 100%;
    border: none;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#filter-options {
    flex-grow: 1;
    overflow-y: auto;
}





#apply-filters,
#reset-filters {
    padding: 1rem;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
    /* Make buttons fill width */
}

#apply-filters {
    background-color: #333;
}

#reset-filters {
    background-color: var(--main-color);
}

.filter-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.filter-actions button {
    font-size: 1.2rem;
    flex: 1;
}

#open-filters {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#clear-personalized {
    position: fixed;
    bottom: 1rem;
    left: calc(1rem + 90px);
    padding: 1rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.client-header {
    background-color: var(--main-color);
    color: white;
    padding: 1rem;
    text-align: center;
}

#menu-selection-modal .modal-content {
    padding: 0;
}

.client-info {
    padding: 1rem;
    text-align: center;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.price-cart-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0rem;
}

.menu-item.checkmarked {
    position: relative;
}

.menu-item.checkmarked::after {
    content: '\2713';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 50px 50px 0;
    border-color: transparent var(--main-color) transparent transparent;
    color: white;
    font-size: 20px;
    line-height: 50px;
    text-align: center;
    transform-origin: top right;
}

.cart-minus-btn {
    background-color: var(--button-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0.5rem 1rem;
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
}

.cart-plus-btn {
    background-color: var(--button-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0.5rem 1rem;
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
}

.cart-controls.not-selectable {
    display: none;
}

/* Guest cart lock: once the order leaves 'active' the guest can no longer
   change quantities, and a banner explains why. */
#menu-container.cart-locked .cart-controls {
    display: none;
}

#cart-locked-banner {
    margin: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: var(--state-ordered-color);
    color: #fff;
    font-weight: bold;
    text-align: center;
}

#cart-locked-banner.hidden {
    display: none;
}

.not-available-banner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(30deg);
    background: rgba(220, 53, 69, 0.85);
    color: #fff;
    font-weight: bold;
    font-size: 1.1em;
    padding: 6px 28px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    letter-spacing: 0.05em;
}

.cart-menu {
    background-color: var(--attenuated-color);
    animation: pulse 1s infinite;
}



@keyframes pulse {
    0% {
        background-color: var(--attenuated-color);
    }

    50% {
        background-color: var(--main-color);
    }

    100% {
        background-color: var(--attenuated-color);
    }
}


html,
body {
    touch-action: manipulation;
}


/* Progress Modal Styles */
.progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 19999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.progress-modal.visible {
    opacity: 1;
    visibility: visible;
}

.progress-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 80%;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--main-color, #333);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-reason {
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--font-color-default, #333);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Prompt Modal Styles */
.prompt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10100;
    /* Above progress (10001) and asset-manager modal (10050) */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.prompt-modal.visible {
    opacity: 1;
    visibility: visible;
}

.prompt-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    width: 90%;
    text-align: left;
}

.prompt-content h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--font-color-default, #333);
}

.prompt-content p {
    margin: 0;
    line-height: 1.5;
    color: var(--main-color, #666);
    white-space: pre-line;
}

.prompt-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.prompt-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: transform 0.1s active, opacity 0.2s;
}

.prompt-btn:active {
    transform: scale(0.95);
}

.prompt-btn.primary {
    background: var(--main-color, #333);
    color: white;
}

.prompt-btn.secondary {
    background: #aaaaaa;
    color: #333;
}

.prompt-btn:hover {
    opacity: 0.9;
}

.trash-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ffffffdd;
    border: 1px solid #ffcccc;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 5;
    color: #ff4444;
}

.trash-btn:hover {
    background: #fff0f0;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #ff9999;
}

/* Options modal */
#options-modal-body {
    flex-grow: 1;
    overflow-y: auto;
}

.options-group {
    margin-bottom: 1.2rem;
}

.options-group-label {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: bold;
    text-transform: capitalize;
}

.option-control-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    cursor: pointer;
    font-size: 1rem;
}

.option-control-label input[type="radio"],
.option-control-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    cursor: pointer;
}

.option-price-label {
    color: var(--attenuated-color);
    font-size: 0.85em;
}

#options-modal-total {
    font-size: 1.1rem;
    padding: 0.5rem 0;
    border-top: 1px solid #eee;
}

#options-modal-confirm {
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 1rem;
    cursor: pointer;
    flex: 1;
}

#options-modal-cancel {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 1rem;
    cursor: pointer;
    flex: 1;
}

/* Selected options display in cart */
.item-selected-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.3rem 0 0.2rem 0;
}

.selected-option-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    background-color: var(--selected-color, #eee);
    font-size: 0.85em;
}

.edit-options-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0.3rem;
    font-size: 0.9em;
    vertical-align: middle;
}

/* ── Help / tooltip system ─────────────────────────────────── */
@keyframes help-ring-flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.help-ring {
    position: fixed;
    border: 8px solid var(--help-ring-color);
    border-radius: 50%;
    pointer-events: auto;
    z-index: 10001;
    animation: help-ring-flash 0.4s ease infinite;
    cursor: pointer;
    box-sizing: border-box;
}

.help-text {
    margin: -2px 0 8px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #555;
    background: #fff7e6;
    border: 1px solid #ffe0a3;
    border-radius: 6px;
}

.help-bubble {
    position: fixed;
    visibility: hidden;
    background: #fff;
    color: var(--font-color-default);
    border: 5px solid var(--font-color-default);
    padding: 0.6rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 220px;
    z-index: 10002;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    --arrow-left: 50%;
}

/* Arrow pointing down (bubble above element) */
.help-bubble::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: var(--arrow-left);
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-bottom: none;
    border-top-color: #111;
}

/* White fill inside the arrow border */
.help-bubble::before {
    content: '';
    position: absolute;
    bottom: -8px;
    left: var(--arrow-left);
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom: none;
    border-top-color: #fff;
    z-index: 1;
}

/* Arrow pointing up (bubble below element) */
.help-bubble.below::after {
    bottom: auto;
    top: -11px;
    border-top: none;
    border-bottom-color: #111;
}

.help-bubble.below::before {
    bottom: auto;
    top: -8px;
    border-top: none;
    border-bottom-color: #fff;
}

/* ── Unit label & notes (viewer item cards) ── */

.item-unit-label {
    font-size: 0.8em;
    font-weight: normal;
    color: #888;
}

.item-notes-viewer {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    margin-top: 0.2rem;
}

/* Shared table-number pill — identical look everywhere (admin session detail,
   service order list & header). Colored by the client's --attenuated-color. */
.session-table-badge {
    font-size: 1.5rem;
    background: var(--attenuated-color, #eee);
    color: #444;
    font-weight: bold;
    padding: 0.05rem 0.5rem;
    border-radius: 10px;
    text-align: center;
    align-self: center;
    flex-shrink: 0;
    display: inline-block;
    box-sizing: border-box;
    min-width: 4ch;
}

/* Placeholder so rows without a table keep the column width / alignment. */
.session-table-badge.is-empty {
    background: transparent;
}