/* ================================
   StudentHub Bottom Navigation
   ================================ */

.bottom-nav {
    --nav-brand: #2747c4;
    --nav-text: #737373;
    --nav-hover: #262626;
    --nav-background: rgba(255, 255, 255, 0.96);
    --nav-border: rgba(0, 0, 0, 0.08);

    box-sizing: border-box;

    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 1000;

    transform: translateX(-50%);

    width: min(550px, calc(100% - 24px));

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 5px 28px;

    background: var(--nav-background);
    border: 1px solid var(--nav-border);
    border-radius: 18px;

    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);

    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);

    border: 2px solid rgba(0, 0, 0, 0.06);

    box-shadow:
        0 0 0 5px #F5F2ED,
        0 8px 28px rgba(0, 0, 0, 0.08);
}


/* ================================
   Item
   ================================ */

.bottom-nav__item {
    width: auto;
    min-width: 0;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    color: var(--nav-text);
    text-decoration: none;

    border-radius: 12px;

    -webkit-tap-highlight-color: transparent;

    transition:
        color 120ms ease,
        background-color 120ms ease;
}


/* Иконка + текст */

.bottom-nav__content {
    width: auto;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;
}


/* ================================
   Icon
   ================================ */

.bottom-nav__icon {
    display: block;

    width: 19px;
    height: 19px;

    flex: 0 0 19px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ================================
   Label
   ================================ */

.bottom-nav__label {
    display: block;

    margin: 0;
    padding: 0;

    font-size: 11px;
    font-weight: 600;
    line-height: 20px;

    white-space: nowrap;
}


/* ================================
   Active
   ================================ */

.bottom-nav__item.is-active {
    color: var(--nav-brand);
}


/* ================================
   Hover
   ================================ */

@media (hover: hover) {

    .bottom-nav__item:hover {
        color: var(--nav-hover);
    }

    .bottom-nav__item.is-active:hover {
        color: var(--nav-brand);
    }
}


/* ================================
   Mobile
   ================================ */

@media (max-width: 560px) {

    .bottom-nav {
        bottom: 10px;

        width: calc(100% - 24px);

        /*
         * Главное значение.
         * Первый и последний элементы
         * будут находиться одинаково
         * далеко от краёв панели.
         */
        padding:
            6px
            20px;

        border-radius: 17px;
    }


    .bottom-nav__item {
        height: 46px;

        padding: 0;
    }


    .bottom-nav__content {
        width: auto;

        gap: 5px;
    }


    .bottom-nav__icon {
        width: 20px;
        height: 20px;

        flex: 0 0 20px;
    }


    .bottom-nav__label {
        font-size: 12px;
        font-weight: 600;
        line-height: 22px;
    }
}


/* ================================
   iPhone safe area
   ================================ */

@supports (padding: env(safe-area-inset-bottom)) {

    @media (max-width: 560px) {

        .bottom-nav {
            bottom: calc(
                8px + env(safe-area-inset-bottom)
            );
        }
    }
}