/*
 * ==========================================================
 * TAHLIL_RIGHT_RAIL_V141
 *
 * Final Market Workspace rail.
 * ==========================================================
 */


body.tc-chart-workspace
.tc-market-right-rail-v141 {

    position:
        fixed !important;

    top:
        var(
            --tc-v132-rail-top,
            232px
        ) !important;

    right:
        4px !important;

    bottom:
        16px !important;

    left:
        auto !important;

    width:
        44px !important;

    height:
        auto !important;

    display:
        flex !important;

    flex-direction:
        column !important;

    align-items:
        center !important;

    justify-content:
        flex-start !important;

    gap:
        4px !important;

    padding:
        4px 3px !important;

    box-sizing:
        border-box !important;

    border:
        1px solid
        rgba(255,255,255,.055) !important;

    border-radius:
        7px !important;

    background:
        rgba(15,19,25,.94) !important;

    box-shadow:
        0 4px 18px
        rgba(0,0,0,.18) !important;

    z-index:
        52 !important;

    overflow:
        visible !important;
}


/*
 * Every tool is now a normal child of the rail.
 *
 * This explicitly neutralizes older fixed/absolute placement.
 */

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcWatchlistToggle,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcTemplatesToggle,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcScreenerToggle,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcAlertsToggle,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcMarketThemeToggleV140 {

    position:
        relative !important;

    inset:
        auto !important;

    top:
        auto !important;

    right:
        auto !important;

    bottom:
        auto !important;

    left:
        auto !important;

    order:
        initial !important;

    flex:
        0 0 auto !important;

    width:
        36px !important;

    min-width:
        36px !important;

    max-width:
        36px !important;

    height:
        36px !important;

    min-height:
        36px !important;

    max-height:
        36px !important;

    margin:
        0 !important;

    padding:
        0 !important;

    box-sizing:
        border-box !important;

    border-radius:
        6px !important;
}


/*
 * Explicit final order.
 */

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcWatchlistToggle {

    order:
        10 !important;
}


body.tc-chart-workspace
.tc-market-right-rail-v141
#tcTemplatesToggle {

    order:
        20 !important;
}


body.tc-chart-workspace
.tc-market-right-rail-v141
#tcScreenerToggle {

    order:
        30 !important;
}


body.tc-chart-workspace
.tc-market-right-rail-v141
#tcAlertsToggle {

    order:
        40 !important;

    margin-top:
        5px !important;
}


body.tc-chart-workspace
.tc-market-right-rail-v141
#tcMarketThemeToggleV140 {

    order:
        50 !important;

    margin-top:
        auto !important;
}


/*
 * Unified hover without replacing existing icons.
 */

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcWatchlistToggle:hover,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcTemplatesToggle:hover,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcScreenerToggle:hover,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcAlertsToggle:hover,

body.tc-chart-workspace
.tc-market-right-rail-v141
#tcMarketThemeToggleV140:hover {

    background:
        rgba(255,255,255,.055) !important;

    border-color:
        rgba(223,185,91,.24) !important;
}


/* ==========================================================
   LIGHT THEME
   ========================================================== */


body.tc-chart-workspace[data-tc-market-theme="light"]
.tc-market-right-rail-v141 {

    background:
        rgba(255,255,255,.96) !important;

    border-color:
        rgba(31,42,55,.11) !important;

    box-shadow:
        0 4px 18px
        rgba(31,42,55,.10) !important;
}


body.tc-chart-workspace[data-tc-market-theme="light"]
.tc-market-right-rail-v141
#tcWatchlistToggle:hover,

body.tc-chart-workspace[data-tc-market-theme="light"]
.tc-market-right-rail-v141
#tcTemplatesToggle:hover,

body.tc-chart-workspace[data-tc-market-theme="light"]
.tc-market-right-rail-v141
#tcScreenerToggle:hover,

body.tc-chart-workspace[data-tc-market-theme="light"]
.tc-market-right-rail-v141
#tcAlertsToggle:hover,

body.tc-chart-workspace[data-tc-market-theme="light"]
.tc-market-right-rail-v141
#tcMarketThemeToggleV140:hover {

    background:
        rgba(31,42,55,.055) !important;
}


/* ==========================================================
   TABLET
   ========================================================== */


@media (
    min-width: 761px
)
and (
    max-width: 1000px
) {

    body.tc-chart-workspace
    .tc-market-right-rail-v141 {

        top:
            var(
                --tc-v132-rail-top,
                282px
            ) !important;
    }

}


/* ==========================================================
   MOBILE
   ========================================================== */


@media (max-width: 760px) {

    body.tc-chart-workspace
    .tc-market-right-rail-v141 {

        top:
            auto !important;

        right:
            8px !important;

        bottom:
            9px !important;

        left:
            auto !important;

        width:
            auto !important;

        height:
            44px !important;

        flex-direction:
            row !important;

        gap:
            3px !important;

        padding:
            3px !important;
    }


    body.tc-chart-workspace
    .tc-market-right-rail-v141
    #tcAlertsToggle {

        margin-top:
            0 !important;

        margin-right:
            4px !important;
    }


    body.tc-chart-workspace
    .tc-market-right-rail-v141
    #tcMarketThemeToggleV140 {

        margin-top:
            0 !important;

        margin-left:
            3px !important;
    }

}



/* ==========================================================
   V151 DEMO BUTTON SUPPORT IN RIGHT RAIL
   ========================================================== */


body.tc-chart-workspace
.tc-market-right-rail-v141
#tcDemoTradingToggleV151 {


    position:
        relative !important;


    inset:
        auto !important;


    top:
        auto !important;


    right:
        auto !important;


    bottom:
        auto !important;


    left:
        auto !important;


    order:
        45 !important;


    flex:
        0 0 auto !important;


    width:
        36px !important;


    min-width:
        36px !important;


    height:
        36px !important;


    min-height:
        36px !important;


    margin:
        0 !important;


    padding:
        0 !important;


    display:
        grid !important;


    place-items:
        center !important;


    box-sizing:
        border-box !important;


    border-radius:
        6px !important;


    color:
        #909aa7 !important;


    background:
        transparent !important;


    border:
        1px solid rgba(255,255,255,.08) !important;


    opacity:
        1 !important;


    visibility:
        visible !important;


    cursor:
        pointer !important;

}


body.tc-chart-workspace
.tc-market-right-rail-v141
#tcDemoTradingToggleV151:hover {


    color:
        #e1b95d !important;


    background:
        rgba(255,255,255,.055) !important;


    border-color:
        rgba(225,185,93,.24) !important;

}



/* ==========================================================
   V141 RAIL ICON VISIBILITY FORCE
   ========================================================== */


body.tc-chart-workspace
.tc-market-right-rail-v141
button {


    display:
        grid !important;


    place-items:
        center !important;


    visibility:
        visible !important;


    opacity:
        1 !important;


    color:
        #dce2ea !important;


    font-size:
        18px !important;


    line-height:
        1 !important;


    overflow:
        visible !important;


}



body.tc-chart-workspace
.tc-market-right-rail-v141
button svg,
body.tc-chart-workspace
.tc-market-right-rail-v141
button span {


    visibility:
        visible !important;


    opacity:
        1 !important;

}





/* ==========================================================
   V141 FINAL STACK FIX
   ========================================================== */

body.tc-chart-workspace
.tc-market-right-rail-v141 {

    z-index:
        999999 !important;

    isolation:
        isolate !important;

    pointer-events:
        auto !important;

}


body.tc-chart-workspace
.tc-market-right-rail-v141
button {

    position:
        relative !important;

    z-index:
        1000000 !important;

    pointer-events:
        auto !important;

}

