body {
    font-family: var(--default-font);
    font-size: 13px;
    line-height: 16px;
    font-weight: 400;
    background-color: var(--block-bg-color);
    color: var(--text-color);
    color-scheme: var(--tg-color-scheme);
    margin: 0;
    padding: 0;
    width: 1px;
    min-width: 100%;

    --default-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    --block-bg-color: var(--tg-theme-bg-color);
    --bg-color: #ebedf0;
    --animation: .15s ease;
    --page-animation-duration: .3s;
    --page-animation: var(--page-animation-duration) ease;
    --status-height: 48px;
    --accent-color: #31b545;
    --remove-color: #D0392E;
    --main-color: #ff6600;
    --text-color: #222;
    --page-hint-color: #83878a;
    --card-bg-color: #ffffff;
    --placeholder-color: #999da1;
    --ripple-duration: .45s;
    --ripple-end-duration: .3s;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
}

html.dark body {
    --block-bg-color: var(--tg-theme-bg-color);
    --bg-color: #0f0f0f;
    --text-color: #fff;
    --page-hint-color: #9b9ba1;
    --card-bg-color: #434343;
    --placeholder-color: #5d6163;
}

body.order-mode {
    background-color: var(--bg-color);
}

* {
    -webkit-tap-highlight-color: transparent;
}

body.closed .menu-page {
    filter: grayscale(1) opacity(0.7);
}

section {
    padding: 10px;
}

.section-title {
    padding: 0;
    margin-bottom: 20px;
    /*padding: 10px;*/
}

.dishes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dish-card {
    background-color: var(--card-bg-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: calc(33.333% - 10px);
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.dish-card img {
    width: 100%;
    height: auto;
}

.dish-info {
    padding: 5px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dish-info h3 {
    margin: 0 0 5px;
    font-size: 14px;
}

.dish-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.dish-details div {
    display: flex;
    flex-direction: row;
}

.weight-price {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.dish-details p {
    margin: 3px 0;
    color: #666;
    font-size: 12px;
}

.button-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    position: relative;
}

.add-button {
    background-color: #ff6600;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
    transition: width 0.3s ease, opacity 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.add-button .text {
    transition: opacity 0.3s ease;
}

.add-button.small-button .text {
    opacity: 0;
}

.add-button.small-button {
    width: 30px;
    padding: 5px;
    text-align: center;
}

.add-button:hover {
    background-color: #e65c00;
}

.minus-button {
    background-color: #ff1e00;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
    transition: opacity .3s ease;
    position: absolute;
    left: 0;
    opacity: 0;
    pointer-events: none;
}

.minus-button.visible {
    opacity: 1;
    pointer-events: auto;
}

.minus-button.small-button {
    width: 30px;
    padding: 5px;
    text-align: center;
}

.minus-button:hover {
    background-color: #ff2f00;
}

.quantity {
    margin-top: 4px;
    font-weight: bold;
    font-size: 15px;
    transition: opacity 0.7s ease;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.quantity.visible {
    opacity: 1;
    pointer-events: auto;
}

.item-incr-button:hover {
    background-color: #e65c00;
}

.dish-price {
    font-weight: 700;
    white-space: nowrap;
    align-content: flex-end;
}

.menu-page {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 480px;
    justify-content: space-around;
    align-content: flex-end;
    transition: max-height var(--page-animation), opacity var(--page-animation);
    background-color: var(--block-bg-color);
}

body.order-mode .menu-page {
    max-height: 0 !important;
    opacity: 0 !important;
}

body.order-mode {
    transition: max-height 0.3s, opacity 0.3s;
}

.order-overview {
    display: none;
    font-family: var(--default-font);
    background-color: var(--bg-color);
    transition: opacity var(--page-animation);
    opacity: 0;
}

.order-edit {
    font-size: 15px;
    line-height: 18px;
    font-weight: 500;
    color: var(--accent-color);
}

.order-remove {
    font-size: 15px;
    line-height: 18px;
    font-weight: 500;
    color: var(--remove-color);
}

body.order-mode .order-overview {
    opacity: 1;
}

.order-header-wrap {
    padding: 21px 20px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.block {
    background-color: var(--block-bg-color);
    -webkit-box-shadow: 0 1px rgba(0, 0, 0, .07);
    box-shadow: 0 1px rgba(0, 0, 0, .07);
}

.order-item-photo {
    text-align: center;
    width: 50px;
    height: 50px;
    margin-right: 11px;
}

.order-item {
    display: flex;
    width: 100%;
    justify-content: space-around;
}

.order-item-photo {
    font-size: 38px;
    line-height: 50px;
}

.order-item-photo {
    width: 80px;
    margin: 4px 0;
}

.order-item-title {
    font-size: 15px;
    line-height: 18px;
    font-weight: 700;
    padding: 3px 0;
}

.order-header {
    font-size: 17px;
    line-height: 21px;
    text-transform: uppercase;
    flex-grow: 1;
    padding: 0;
    margin: 0;
}

.order-item-counter {
    color: var(--main-color);
}

.order-item-description {
    font-size: 14px;
    line-height: 17px;
    -webkit-font-smoothing: antialiased;
    color: var(--page-hint-color);
    padding: 2px 0;
}
.order-item-price {
    font-size: 14px;
    line-height: 17px;
    font-weight: 500;
    padding: 4px 0;
}

.order-item-label {
    flex-grow: 1;
}