:root,
:root.light {
    --bg-color: var(--tg-theme-bg-color, #FFFFFF);
    --popover-bg-color: var(--tg-theme-bg-color, #FFFFFF);
    --text-color: var(--tg-theme-text-color, #333333);
    --accent-color: var(--tg-theme-button-color, #609F6D);
    --on-accent-color: var(--tg-theme-button-text-color, #FFFFFF);
    --divider-color: #80808025;
    --success-color: #609F6D;
    --warning-color: #FFD775;
    --error-color: #F45B55;
    --shimmer-color-1: #555555;
    --shimmer-color-2: #000000;
}

:root.dark {
    --bg-color: var(--tg-theme-secondary-bg-color, var(--tg-theme-bg-color, #121212));
    --popover-bg-color: var(--tg-theme-bg-color, #242424);
    --text-color: var(--tg-theme-text-color, #FFFFFF);
    --divider-color: #FFFFFF15;
    --shimmer-color-1: #D0D0D0;
    --shimmer-color-2: #FFFFFF;
} 

body {
    margin: 0;
    color-scheme: var(--tg-color-scheme);
    color: var(--text-color);
    background-color: var(--bg-color);
    text-wrap: balance;
}

h1 {
    width: fit-content;
    min-width: 45%;
    min-height: 1em;
    margin: 0;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 24px;
    /* border-radius: 8px; */
    display: block;
}

h2 {
    width: fit-content;
    margin: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 20px;
    font-weight: 500;
    border-radius: 8px;
}

h3 {
    width: fit-content;
    margin: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
}

h6 {
    width: fit-content;
    min-width: 45%;
    min-height: 1em;
    margin: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
}

p {
    width: fit-content;
    min-width: 90%;
    min-height: 1em;
    margin: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    white-space: wrap;
    opacity: 0.36;
    border-radius: 8px;
}

button {
    color: var(--text-color);
}

p.small {
    font-size: 11px;
}

.cover {
    width: 100%;
    height: calc(100vw * 3 / 4);
    object-fit: cover;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.page {
    width: 100vw;
    min-height: 100%;
    position: absolute;
    background-color: var(--bg-color);
    box-shadow: 0 4px 8px 0 rgba(160, 160, 160, 0.1), 0 6px 20px 0 rgba(160, 160, 160, 0.1);
}

.icon-button {
    position: relative;
    overflow: hidden;
    background-color: inherit;
    border: none;
    cursor: pointer;
    font-size: 16px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
}

.icon-button.small {
    width: 32px;
    height: 32px;
    font-size: 20px;
}

/* Cafe info */
.cafe-logo-container {
    position: absolute;
    width: 72px;
    height: 72px;
    right: 0;
    margin-right: 40px;
    margin-top: calc(100vw * 3 / 4 - 84px);
    border-radius: 36px;
    background-color: var(--popover-bg-color);
    box-shadow: inset 0 0.3px 0.4px hsla(230, 13%, 9%, 0.02),
        0 0.9px 1.5px hsla(230, 13%, 9%, 0.045),
        0 3.5px 6px hsla(230, 13%, 9%, 0.09);
    z-index: 2;
}

.cafe-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.cafe-info-container {
    position: relative;
    z-index: 1;
    width: 100vw - 32px;
    margin-left: 16px;
    margin-top: -48px;
    margin-right: 16px;
    border-radius: 24px;
    background-color: var(--popover-bg-color);
    box-shadow: inset 0 0.3px 0.4px hsla(230, 13%, 9%, 0.02),
        0 0.9px 1.5px hsla(230, 13%, 9%, 0.045),
        0 3.5px 6px hsla(230, 13%, 9%, 0.09);
    padding: 24px;
}

.cafe-work-hours {
    min-height: 1em;
    margin-top: 2px;
}

.cafe-parameters-container {
    min-height: calc(1em + 4px);
    display: flex;
    margin-top: 12px;
    font-size: 14px;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px;
    flex-flow: row wrap;
    gap: 8px;
}

.cafe-parameter-container {
    display: flex;
    align-items: center;
    word-wrap: nowrap;
}

.cafe-parameter-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.cafe-parameter-value {
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    opacity: 0.72;
}

.cafe-status {
    padding: 4px 16px;
    border-radius: 6px;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    color: #FFFFFF;
}

.cafe-status-closed {
    background-color: var(--error-color);
}

.cafe-status-opened {
    background-color: var(--success-color);
}



/* Sections (e.g. categories or popular */

.cafe-section-container {
    margin-top: 24px;
}

.cafe-section-title {
    margin: 16px;
}

.cafe-section-horizontal {
    padding: 12px 16px;
    overflow-x: scroll;
    /* white-space: nowrap; */
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cafe-section-horizontal::-webkit-scrollbar {
    display: none;
}

.cafe-section-vertical {
    padding: 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

/* Category item */

.cafe-category-container {
    min-width: 64px;
    width: 64px;
    height: 64px;
    padding: 8px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    cursor: pointer;
}

.cafe-category-icon {
    width: 32px;
    height: 32px;
    opacity: 0.36;
}

.cafe-category-name {
    font-family: 'Rubik', sans-serif;
    font-size: 12px;
    color: #212427;
    opacity: .72;
}



/* Cafe item*/

.cafe-item-container {
    max-width: 224px;
    width: calc((100vw - 16px * 3) / 2);
    cursor: pointer;
}

.cafe-item-image {
    max-width: 224px;
    max-height: 168px;
    width: calc((100vw - 16px * 3) / 2);
    height: calc((100vw - 16px * 3) / 2 * 3 / 4);
    object-fit: cover;
    border-radius: 16px;
}

.cafe-item-name-ishot {
    width: 13px;
    display: inline-block;
}

.cafe-item-name-ishot.hidden {
    display: none;
}

.cafe-item-name {
    margin-top: 8px;
    margin-bottom: 4px;
    display: inline-block;
}

.cafe-item-description {
    margin-top: 2px;
}

/* Cafe item details */

.cafe-item-details-container {
    height: 100vh;
}

.cafe-item-details-content {
    /* Quantity selector container minmimum height x2 */
    padding-bottom: 128px;
}

.cafe-item-details-quantity-selector-value {
    padding: 8px 32px;
    background-color: var(--divider-color);
    border-radius: 16px;
}

.cafe-item-details-quantity-selector-container {
    margin: 10px;
}

.cafe-item-details-title-container {
    margin: 16px 16px 0 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
}

.cafe-item-details-name {
    margin-right: 16px;
    flex-grow: 1;
}

.cafe-item-details-ishot {
    width: 24px;
}

.nothot {
    filter: grayscale(1);
    opacity: 0.36;
}

.cafe-item-details-weight {
    min-width: 5.5em;
    opacity: .72;
    white-space: nowrap;
}

.cafe-item-details-description {
    min-width: calc(100% - 32px);
    min-height: 3em;
    margin: 16px 16px 0 16px;
}

.cafe-item-details-image {
    width: 100%;
    height: calc(100vw * 3 / 4);
    object-fit: cover;
    max-height: 300px;

    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
}

.cafe-item-details-section-title {
    flex-grow: 1;
    margin: 16px 16px 0 16px;
}

.cafe-item-details-section-price {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin-top: 16px;
    padding: 0 16px;
}

.cafe-item-details-price {
    min-width: 3em;
    min-height: 1em;
}

.cafe-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* min-height: 64px; */
    background-color: var(--popover-bg-color);
    box-shadow: inset 0 0.3px 0.4px hsla(230, 13%, 9%, 0.02),
        0 0.9px 1.5px hsla(230, 13%, 9%, 0.045),
        0 3.5px 15px hsla(230, 13%, 9%, 0.09);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    z-index: 2;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.cafe-topbar-container {
    position: relative;
    left: 0;
    top: 0;
    min-height: 56px;
    background-color: var(--popover-bg-color);
    box-shadow: inset 0 0.3px 0.4px hsla(230, 13%, 9%, 0.02),
        0 0.9px 1.5px hsla(230, 13%, 9%, 0.045),
        0 3.5px 15px hsla(230, 13%, 9%, 0.09);
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    z-index: 2;
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-left: 16px;
    padding-right: 16px;
    margin-bottom: 16px;
}

/* Event details */

.cafe-event-details-container {
    height: 100vh;
    max-width: 500px;
    margin: 0 auto;
}

.cafe-event-details-image {
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    width: 100%;
    max-height: 500px;
    height: auto;
    object-fit: contain;
}

.cafe-event-details-title-container {
    margin: 16px 16px 0 16px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
}

.cafe-event-details-name {
    flex-grow: 1;
    margin-right: 16px;
}

.cafe-event-details-date {
    min-width: 5.5em;
    opacity: .72;
    white-space: nowrap;
    text-align: right;
}

.cafe-event-details-description {
    margin: 16px;
    opacity: 0.72;
}


/* Cart item */

.cart-items-container {
    height: 100vh;
}

.cart-item-container {
    display: flex;
    flex-wrap: nowrap;
    padding: 8px 16px;
}

.cart-item-image {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: cover;
}

.cart-item-info-container {
    flex: 1;
    padding: 0 16px;
    white-space: wrap;
    cursor: pointer;
}

.cart-item-name {
    margin-top: 4px;
}

.cart-item-description {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-cost {
    margin-top: 4px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: var(--accent-color);
}

.cart-item-quantity-container {
    height: 56px;
    display: -webkit-flex;
    -webkit-flex-wrap: nowrap;
    -webkit-align-items: center;
    -webkit-justify-content: center;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

.cart-item-quantity {
    min-width: 32px;
    height: 32px;
    margin-left: 6px;
    margin-right: 0px;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 32px;
    color: var(--on-accent-color);
    background-color: var(--accent-color);
    border-radius: 14px;
    text-align: center;
}

.cart-empty-placeholder {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: -88px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cart-empty-placeholder h3 {
    margin-top: -88px;
    text-align: center;
}

.cart-empty-placeholder p {
    margin-top: 4px;
    text-align: center;
}

.cafe-total-details-section-price {
    display: flex;
    padding: 32px;
}

.cafe-total-details-section-title {
    flex-grow: 1;
}

/* Common (effect, animations, etc.) */
.shimmer {
    animation-duration: 2.2s;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-name: shimmer;
    animation-timing-function: linear;
    background: linear-gradient(to right, var(--shimmer-color-1) 8%, var(--shimmer-color-2) 18%, var(--shimmer-color-1) 33%);
    background-size: 1200px 100%;
    color: transparent;
    opacity: .075;
}

/* Button */
.btn {
    position: relative;

    display: block;
    padding: 0;

    overflow: hidden;

    border-width: 0;
    outline: none;
    border-radius: 2px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .6);

    background-color: #2ecc71;
    color: #ecf0f1;

    transition: background-color .3s;
    padding: 12px 24px;

    margin: 10px;
}

.btn:hover,
.btn:focus {
    background-color: #27ae60;
}

.btn:before {
    content: "";

    position: absolute;
    top: 50%;
    left: 50%;

    display: block;
    width: 0;
    padding-top: 0;

    border-radius: 100%;

    background-color: rgba(236, 240, 241, .3);

    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.btn:active:before {
    width: 120%;
    padding-top: 120%;

    transition: width .2s ease-out, padding-top .2s ease-out;
}


@-webkit-keyframes shimmer {
    0% {
        background-position: -100% 0;
    }

    100% {
        background-position: 100% 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1200px 0;
    }

    100% {
        background-position: 1200px 0;
    }
}