@import "../js/modules/admin/styles/analyst-reports.css";

/* ==========================================================================
   COLOSIAN MARKETS — APPLICATION SHELL
   ========================================================================== */

.terminal-shell {
    width: 100%;
    height: 100vh;
    min-height: 100vh;

    display: grid;
    grid-template-rows:
        auto minmax(0, 1fr);

    background: transparent;

    overflow: hidden;
}

/* ==========================================================================
   SHELL HEADER
   ========================================================================== */

.terminal-shell__header {
    position: relative;

    z-index: 50;

    width: 100%;

    background:
        rgba(17, 19, 21, 0.94);

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.terminal-header {
    width: 100%;
    overflow: visible;
}

.terminal-header--topnav {
    display: grid;

    grid-template-columns:
        180px minmax(0, 1fr) max-content;

    align-items: center;

    gap: 1rem;

    min-height: 64px;

    padding:
        0.65rem 1rem;

    box-sizing: border-box;
}

/* ==========================================================================
   AUTH HEADER
   ========================================================================== */

.terminal-header--auth {
    grid-template-columns: auto;

    justify-content: start;

    min-height: 64px;
}

.terminal-header--auth .terminal-header__left {
    justify-content: flex-start;
}

/* ==========================================================================
   HEADER LEFT / BRAND
   ========================================================================== */

.terminal-header__left {
    display: flex;
    align-items: center;

    justify-self: start;

    min-width: 0;
}

.terminal-brand {
    appearance: none;

    display: inline-flex;
    align-items: center;

    padding: 0;
    margin: 0;

    border: 0;

    background: transparent;

    cursor: pointer;
}

.terminal-brand__logo {
    display: block;

    width: 142px;
    max-width: 142px;
    height: auto;

    object-fit: contain;
}

.terminal-brand:hover {
    opacity: 0.92;
}

/* ==========================================================================
   HEADER CENTER
   ========================================================================== */

.terminal-header__center {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-width: 0;

    overflow: hidden;
}

/* ==========================================================================
   PRIMARY NAVIGATION
   ========================================================================== */

.terminal-topnav {
    display: inline-flex;
    align-items: center;

    gap: 0.3rem;

    width: max-content;
    max-width: 100%;

    padding: 0.22rem;

    overflow-x: auto;
    overflow-y: hidden;

    border:
        1px solid var(--border);

    border-radius: 999px;

    background:
        var(--chip-bg);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    scrollbar-width: none;
}

.terminal-topnav::-webkit-scrollbar {
    display: none;
}

.terminal-topnav__item {
    appearance: none;

    flex: 0 0 auto;

    padding:
        0.56rem 0.72rem;

    border: 0;

    border-radius: 999px;

    background: transparent;

    color:
        var(--muted);

    font-size: 0.8rem;
    font-weight: 600;

    cursor: pointer;

    white-space: nowrap;

    transition:
        color 160ms ease,
        background 160ms ease,
        border-color 160ms ease;
}

.terminal-topnav__item:hover {
    color:
        var(--text);

    background:
        rgba(255, 255, 255, 0.05);
}

.terminal-topnav__item--active {
    color:
        var(--text-strong);

    background:
        rgba(255, 255, 255, 0.10);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   HEADER RIGHT
   ========================================================================== */

.terminal-header__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    justify-self: end;

    gap: 0.5rem;

    min-width: 0;

    white-space: nowrap;

    box-sizing: border-box;
}

/* ==========================================================================
   SEARCH
   ========================================================================== */

.terminal-header__search {
    display: inline-flex;
    align-items: center;

    gap: 0.45rem;

    width: 220px;
    max-width: 220px;

    padding:
        0.56rem 0.72rem;

    overflow: hidden;

    flex: 0 0 auto;

    border:
        1px solid var(--border);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.025);

    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.terminal-header__search:focus-within {
    border-color:
        var(--border-strong);

    background:
        rgba(255, 255, 255, 0.04);

    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.035);
}

.terminal-header__search-icon {
    color:
        var(--thin);

    font-size: 0.82rem;

    line-height: 1;

    flex: 0 0 auto;
}

.terminal-header__search-input {
    width: 100%;
    min-width: 0;

    padding: 0;

    background: transparent;

    border: 0;

    outline: none;

    color:
        var(--text);

    font-size: 0.82rem;
}

.terminal-header__search-input::placeholder {
    color:
        var(--thin);
}

/* ==========================================================================
   DATE
   ========================================================================== */

.terminal-header__pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    padding:
        0.48rem 0.68rem;

    border:
        1px solid var(--border);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.025);

    color:
        var(--muted);

    font-size: 0.72rem;
    font-weight: 600;

    letter-spacing: 0.02em;

    white-space: nowrap;
}

/* ==========================================================================
   POWER BUTTON
   ========================================================================== */

.terminal-header__power {
    appearance: none;

    width: 36px;
    height: 36px;

    display: inline-grid;

    place-items: center;

    flex: 0 0 auto;

    padding: 0;

    border:
        1px solid var(--border);

    border-radius: 12px;

    background:
        rgba(255, 255, 255, 0.025);

    color:
        var(--muted);

    cursor: pointer;

    font-size: 0.9rem;

    line-height: 1;

    transition:
        transform 160ms ease,
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease;
}

.terminal-header__power:hover {
    transform:
        translateY(-1px);

    background:
        rgba(255, 255, 255, 0.07);

    color:
        var(--text);

    border-color:
        var(--border-strong);
}

.terminal-header__power:focus {
    outline: none;
}

.terminal-header__power:focus-visible {
    outline: none;

    border-color:
        var(--border-strong);

    box-shadow:
        0 0 0 4px rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   CONTENT

   Default behaviour:
   every app view can scroll vertically.

   CM500 / CM100 override this inside app-market-data.css so only
   the creator asset table scrolls there.
   ========================================================================== */

.terminal-shell__content {
    width: 100%;

    min-width: 0;
    min-height: 0;

    padding:
        0.85rem 1rem 1.25rem;

    box-sizing: border-box;

    overflow-x: hidden;
    overflow-y: auto;

    overscroll-behavior: contain;

    scrollbar-width: thin;
}

.terminal-shell__content::-webkit-scrollbar {
    width: 8px;
}

.terminal-shell__content::-webkit-scrollbar-track {
    background:
        rgba(255, 255, 255, 0.01);
}

.terminal-shell__content::-webkit-scrollbar-thumb {
    background:
        rgba(255, 255, 255, 0.12);

    border-radius: 999px;
}

/* ==========================================================================
   RESPONSIVE — 1440
   ========================================================================== */

@media (max-width: 1440px) {
    .terminal-header--topnav {
        grid-template-columns:
            150px minmax(0, 1fr) max-content;

        gap: 0.65rem;
    }

    .terminal-brand__logo {
        width: 120px;
        max-width: 120px;
    }

    .terminal-header__search {
        width: 180px;
        max-width: 180px;
    }

    .terminal-topnav__item {
        padding:
            0.52rem 0.62rem;

        font-size: 0.76rem;
    }
}

/* ==========================================================================
   RESPONSIVE — 1280
   ========================================================================== */

@media (max-width: 1280px) {
    .terminal-shell {
        height: auto;
        min-height: 100vh;

        display: block;

        overflow: visible;
    }

    .terminal-shell__header {
        position: sticky;
        top: 0;
    }

    .terminal-header--topnav {
        grid-template-columns:
            auto minmax(0, 1fr);

        grid-template-areas:
            "brand right"
            "nav nav";

        align-items: center;

        gap:
            0.55rem 1rem;
    }

    .terminal-header__left {
        grid-area: brand;

        justify-self: start;
    }

    .terminal-header__center {
        grid-area: nav;

        justify-self: stretch;

        justify-content: flex-start;

        overflow: hidden;
    }

    .terminal-header__right {
        grid-area: right;

        justify-self: end;

        justify-content: flex-end;
    }

    .terminal-topnav {
        width: 100%;

        box-sizing: border-box;
    }

    .terminal-header__search {
        width:
            min(220px, 30vw);

        max-width: 220px;
    }

    .terminal-header--auth {
        display: flex;

        min-height: 60px;
    }

    .terminal-shell__content {
        overflow: visible;
    }
}

/* ==========================================================================
   RESPONSIVE — TABLET / MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .terminal-shell__content {
        padding:
            0.75rem 0.75rem 1rem;
    }

    .terminal-header--topnav {
        display: grid;

        grid-template-columns:
            1fr auto;

        grid-template-areas:
            "brand right"
            "nav nav";

        padding:
            0.65rem 0.75rem;
    }

    .terminal-brand__logo {
        width: 120px;
        max-width: 120px;
    }

    .terminal-header__right {
        width: auto;

        justify-content: flex-end;

        flex-wrap: nowrap;
    }

    .terminal-header__search {
        display: none;
    }

    .terminal-header__pill {
        display: none;
    }

    .terminal-topnav {
        width: 100%;
    }

    .terminal-header--auth {
        display: flex;

        min-height: 58px;

        padding:
            0.6rem 0.75rem;
    }
}