﻿.insights-card {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
}

/* Small fade at bottom to hint scroll */
.modal-body#insightsHost::after {
    content: "";
    position: sticky;
    bottom: -1px;
    height: 24px;
    display: block;
    background: linear-gradient(to bottom, transparent, var(--bs-body-bg));
    pointer-events: none;
}


:root {
    --equity-h: 260px;
    --heatmap-h: 160px;
    --radar-h: 240px;
    --ranking-h: 200px
}

.insights-widget {
    position: relative;
    width: 100%;
    overflow: visible;
    border-radius: .25rem;
    background: var(--bs-body-bg);
    contain: content
}

    .insights-widget.equity {
        height: var(--equity-h)
    }

    .insights-widget.heatmap {
        height: var(--heatmap-h)
    }

    .insights-widget.radar {
        height: var(--radar-h)
    }

    .insights-widget.ranking {
        height: var(--ranking-h)
    }

    .insights-widget::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg,rgba(0,0,0,.03) 0%,rgba(0,0,0,.07) 50%,rgba(0,0,0,.03) 100%);
        background-size: 200% 100%;
        animation: insights-shimmer 1.1s linear infinite;
        z-index: 1
    }

@keyframes insights-shimmer {
    0% {
        background-position: 200% 0
    }

    100% {
        background-position: -200% 0
    }
}

.insights-widget.has-content::before {
    display: none
}
/* Heatmap table */
.monthly-heatmap table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse
}

.monthly-heatmap th, .monthly-heatmap td {
    text-align: center;
    height: 26px;
    font-size: .8rem;
    white-space: nowrap;
    overflow: hidden
}
/* Ranking list */
.ranking-list {
    list-style: none;
    margin: 0;
    padding: .25rem .5rem
}

    .ranking-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: .375rem .5rem;
        border-bottom: 1px dashed rgba(0,0,0,.08)
    }

        .ranking-list li:last-child {
            border-bottom: 0
        }

.ranking-name {
    font-weight: 600
}

.rank-bar {
    position: relative;
    height: 8px;
    border-radius: 6px;
    background: rgba(0,0,0,.08);
    overflow: hidden;
    min-width: 120px
}

    .rank-bar > span {
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        border-radius: 6px;
        background: #1f6feb
    }

.rank-badge {
    padding: .15rem .4rem;
    border-radius: .35rem;
    font-size: .72rem;
    background: rgba(31,111,235,.1);
    color: #1f6feb
}

.rank-winner {
    outline: 2px solid #1f6feb;
    outline-offset: 2px;
    border-radius: .35rem;
    padding-inline: .25rem
}
