/* =========================================================
   NASSHAM TRADETALK
   SHARED FIXED BOTTOM TRADE BAR
========================================================= */


/* =========================================================
   ROOT
========================================================= */

:root {
    --trade-bar-height: 64px;

    --trade-bar-bg: rgba(255, 255, 255, 0.97);

    --trade-bar-border: #e5e7eb;

    --trade-bar-text: #667085;

    --trade-bar-hover: #0d6efd;

    --trade-bar-hover-bg: #f8fafc;

    --trade-bar-shadow:
        0 -4px 18px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   FIXED BOTTOM BAR
========================================================= */

.trade-bottom-bar {

    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;

    height: var(--trade-bar-height);

    display: flex;

    align-items: stretch;
    justify-content: center;

    margin: 0;
    padding: 0;

    background: var(--trade-bar-bg);

    border-top: 1px solid var(--trade-bar-border);

    box-shadow: var(--trade-bar-shadow);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    z-index: 999999;
}


/* =========================================================
   BAR ITEMS
========================================================= */

.trade-bottom-item {

    flex: 1;

    width: 100%;
    max-width: 220px;

    min-width: 0;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;

    color: var(--trade-bar-text);

    text-decoration: none;

    font-family: inherit;

    font-size: inherit;

    line-height: 1;

    cursor: pointer;

    appearance: none;
    -webkit-appearance: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.15s ease;
}


/* =========================================================
   ICON
========================================================= */

.trade-bottom-item i {

    display: block;

    margin: 0;

    font-size: 19px;

    line-height: 1;

    pointer-events: none;
}


/* =========================================================
   LABEL
========================================================= */

.trade-bottom-item span {

    display: block;

    margin: 0;

    font-size: 11px;

    font-weight: 600;

    line-height: 1.2;

    white-space: nowrap;

    pointer-events: none;
}


/* =========================================================
   HOVER
========================================================= */

.trade-bottom-item:hover {

    color: var(--trade-bar-hover);

    background-color: var(--trade-bar-hover-bg);
}


/* =========================================================
   ACTIVE
========================================================= */

.trade-bottom-item:active {

    transform: scale(0.96);
}


/* =========================================================
   KEYBOARD ACCESSIBILITY
========================================================= */

.trade-bottom-item:focus {

    outline: none;
}


.trade-bottom-item:focus-visible {

    outline: 2px solid var(--trade-bar-hover);

    outline-offset: -2px;
}


/* =========================================================
   DISABLED BUTTON
========================================================= */

.trade-bottom-item:disabled {

    opacity: 0.5;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   MOBILE SAFE AREA
========================================================= */

@supports (padding-bottom: env(safe-area-inset-bottom)) {

    .trade-bottom-bar {

        height:
            calc(
                var(--trade-bar-height)
                + env(safe-area-inset-bottom)
            );

        padding-bottom:
            env(safe-area-inset-bottom);
    }

}


/* =========================================================
   CONTENT SAFE SPACE
========================================================= */

/*
   Add bottom space to common full-page layouts so that
   page content does not disappear underneath the bar.
*/

body.has-trade-bottom-bar {

    padding-bottom:
        var(--trade-bar-height);
}


@supports (padding-bottom: env(safe-area-inset-bottom)) {

    body.has-trade-bottom-bar {

        padding-bottom:
            calc(
                var(--trade-bar-height)
                + env(safe-area-inset-bottom)
            );
    }

}


/* =========================================================
   CHAT PAGE SUPPORT
========================================================= */

.chat-page {

    padding-bottom:
        var(--trade-bar-height);
}


@supports (padding-bottom: env(safe-area-inset-bottom)) {

    .chat-page {

        padding-bottom:
            calc(
                var(--trade-bar-height)
                + env(safe-area-inset-bottom)
            );
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 768px) {

    :root {

        --trade-bar-height: 60px;
    }


    .trade-bottom-item {

        max-width: none;
    }


    .trade-bottom-item i {

        font-size: 18px;
    }


    .trade-bottom-item span {

        font-size: 10px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    :root {

        --trade-bar-height: 58px;
    }


    .trade-bottom-item {

        gap: 3px;
    }


    .trade-bottom-item i {

        font-size: 17px;
    }


    .trade-bottom-item span {

        font-size: 10px;
    }

}


/* =========================================================
   VERY SMALL SCREENS
========================================================= */

@media (max-width: 360px) {

    .trade-bottom-item i {

        font-size: 16px;
    }


    .trade-bottom-item span {

        font-size: 9px;
    }

}