:root {
    --ty-navbar-mobile-height: 56px;
    --ty-tygh-padding-bottom-1: var(--ty-navbar-mobile-height);
}

@media (min-width: 768px) {
    :root {
        --ty-navbar-mobile-height: 0px;
    }
}

.ty-navbar-mobile {
    --ty-navbar-mobile-display: flex;

    display: var(--ty-navbar-mobile-display);
    align-items: center;
    height: var(--ty-navbar-mobile-height);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding-bottom: env(safe-area-inset-bottom); // iOS
    background: var(--cs-general-bg-color);
    border-top: 1px solid var(--cs-base);
    transition: all 0.2s;
    z-index: 150;
    user-select: none;
}

@media (min-width: 768px) {
    .ty-navbar-mobile {
        --ty-navbar-mobile-display: none;
    }
}

.ty-navbar-mobile__inner {
    display: flex;
    width: 100%;
    height: 100%;
}

.ty-navbar-mobile__item {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 0;
}

.ty-navbar-mobile__item-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
    gap: 4px;
    width: 100%;
    height: 100%;
    max-width: 100%;
    color: var(--cs-secondary-text);
    background: var(--cs-general-bg-color);
    border: 0;
    padding: 0;
}

.ty-navbar-mobile__item-badge {
    box-sizing: border-box;
    position: absolute;
    top: -2px;
    left: 100%;
    padding: 0 4px;
    max-width: 80px;
    min-width: 17px;
    background: var(--cs-discount-label);
    font-size: var(--cs-font-size-small);
    text-align: center;
    color: #fff;
    border-radius: 99px;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ty-navbar-mobile__item-badge:empty {
    display: none;
}

.ty-navbar-mobile__item-icon-wrapper {
    position: relative;
    display: flex;
}

.ty-navbar-mobile__item-icon {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
}

.ty-navbar-mobile__item-profile-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 24px;
    width: 24px;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    color: var(--cs-general-bg-color);
    background: var(--cs-secondary-text);
    border-radius: 99px;
}

.ty-navbar-mobile__item-custom-icon-wrapper--active .ty-navbar-mobile__item-profile-icon {
    color: var(--cs-btn-primary-color);
    background: var(--cs-primary-button);
}

.ty-navbar-mobile__item-text {
    font-size: var(--cs-font-size-mini);
    line-height: 1.25;
    overflow-x: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

.ty-navbar-mobile__item-text--long {
    letter-spacing: -0.5px;
}

.ty-navbar-mobile__item-link:hover {
    color: var(--cs-font)
}

.ty-navbar-mobile__item-link--active {
    color: var(--cs-primary-button);
}

/** Bottom panel **/
.bp-bottom-buttons.bp-bottom-buttons {
    --bp-bottom-buttons-bottom-part-1: calc(var(--ty-tygh-padding-bottom-1) + var(--ty-tygh-padding-bottom-2));
    --bp-bottom-buttons-bottom-part-2: 5px;

    /** calc(var(--ty-tygh-padding-bottom-1) + var(--ty-tygh-padding-bottom-2) + 5px) **/
    bottom: calc(var(--bp-bottom-buttons-bottom-part-1) + var(--bp-bottom-buttons-bottom-part-2));
}

@media (min-width: 1340px) {
    .bp-bottom-buttons.bp-bottom-buttons {
        --bp-bottom-buttons-bottom-part-1: calc(var(--ty-tygh-padding-bottom-1) + var(--ty-tygh-padding-bottom-2));
        --bp-bottom-buttons-bottom-part-2: 24px;

        /** calc(var(--ty-tygh-padding-bottom-1) + var(--ty-tygh-padding-bottom-2) + 24px) **/
        bottom: calc(var(--bp-bottom-buttons-bottom-part-1) + var(--bp-bottom-buttons-bottom-part-2));
    }
}

html.bp-panel-active .ty-navbar-mobile {
    transform: translateY(calc(-1 * var(--bp-bottom-panel-height)));
}
/** /Bottom panel **/

/** Theme editor **/
html.te-theme-editor-active .ty-navbar-mobile {
    left: var(--content-offset);
}
/** /Theme editor **/
