:root {
    --main-color: #333;
    --button-color: #888888;
    --selected-color: #88888888;
    --font-color-inverted: #f4f4f4;
    --font-color-default: #333;
    --attenuated-color: #666;
}


body {
    font-family: sans-serif;
    margin: 0;
    background-color: #f4f4f4;
}

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: 1rem;
    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: 0.2rem;
}

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

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;
}


#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: var(--main-color);
}

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

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

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

#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;
}

.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;
}

#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: 1rem;
}

#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;
}

#language-switcher.viewer-switcher {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 1000;
}

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

#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;
}

.menu-item img {
    max-width: 100%;
    height: auto;
    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;
}

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

.menu-item img {
    max-width: 100%;
    height: auto;
    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: #6c757d;
}

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

#open-filters {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    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: 1rem;
}

.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;
}

.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: 9999;
    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: 10000;
    /* Higher than progress modal */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* LLM Chat styles */
#llm-chat-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
    font-family: inherit;
}

#llm-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--main-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#llm-chat-toggle:hover {
    transform: scale(1.1);
}

#llm-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
}

#llm-chat-window.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.hidden {
    display: none !important;
}

#llm-chat-header {
    padding: 1rem;
    background: var(--main-color);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#llm-chat-actions {
    display: flex;
    gap: 0.5rem;
}

#llm-chat-actions button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 5px;
    opacity: 0.8;
}

#llm-chat-actions button:hover {
    opacity: 1;
}

#llm-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-message {
    padding: 0.8rem 1rem;
    border-radius: 15px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.user {
    align-self: flex-end;
    background: var(--main-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-message.ai {
    align-self: flex-start;
    background: #eef2f5;
    color: #333;
    border-bottom-left-radius: 2px;
}

.chat-message.error {
    align-self: center;
    background: #ffe5e5;
    color: #d00;
    font-size: 0.85rem;
}

.chat-message.system {
    align-self: center;
    background: #f0f0f0;
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
}

#llm-chat-thinking {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

#llm-chat-input-container {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    background: white;
    border-top: 1px solid #eee;
}

#llm-chat-input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
}

#llm-chat-input:focus {
    border-color: var(--main-color);
}

#llm-chat-send {
    background: var(--main-color);
    color: white;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

#llm-chat-send:hover {
    opacity: 0.9;
}


.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(--attenuated-color, #666);
}

.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: #e0e0e0;
    color: #333;
}

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

opacity: 0.9;
}