/* =========================================================
   TRIMARKETA IHSG TERMINAL V2
   Clean market-terminal style
   ========================================================= */

#tm-ihsg-market-widget {
    width: 100%;
    margin: 0 0 18px;
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/* MAIN */

.tm-ihsg-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

/* HEADER */

.tm-ihsg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef0f4;
}

.tm-ihsg-brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.tm-ihsg-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #111827;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.tm-ihsg-label {
    margin: 0 0 2px;
    color: #111827;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
}

.tm-ihsg-subtitle {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 600;
}

/* MARKET STATUS */

.tm-ihsg-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.tm-ihsg-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
}

/* PRICE */

.tm-ihsg-main {
    display: flex;
    align-items: baseline;
    gap: 13px;
    text-align: right;
}

.tm-ihsg-price {
    color: #111827;
    font-size: 27px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -.045em;
}

.tm-ihsg-change {
    font-size: 12px;
    line-height: 1;
    font-weight: 800;
}

.tm-ihsg-change.positive {
    color: #047857;
}

.tm-ihsg-change.negative {
    color: #dc2626;
}

.tm-ihsg-change.flat {
    color: #64748b;
}

/* CHART */

.tm-ihsg-chart-wrap {
    position: relative;
    height: 145px;
    padding: 12px 15px 5px;
    background:
        linear-gradient(
            to bottom,
            #fff 0%,
            #fff 49%,
            #fafbfc 100%
        );
}

#tm-ihsg-chart {
    display: block;
    width: 100%;
    height: 128px;
}

/* CHART INFO */

.tm-ihsg-chart-meta {
    position: absolute;
    top: 12px;
    left: 18px;
    display: flex;
    gap: 12px;
    pointer-events: none;
}

.tm-ihsg-chart-meta span {
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
}

/* STATS */

.tm-ihsg-stats {
    display: grid;
    grid-template-columns:
        repeat(5, minmax(0, 1fr));
    border-top: 1px solid #eef0f4;
    border-bottom: 1px solid #eef0f4;
}

.tm-ihsg-stat {
    min-width: 0;
    padding: 11px 15px;
    border-right: 1px solid #eef0f4;
}

.tm-ihsg-stat:last-child {
    border-right: 0;
}

.tm-ihsg-stat-label {
    margin-bottom: 4px;
    color: #9ca3af;
    font-size: 8px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.tm-ihsg-stat-value {
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* FOOTER */

.tm-ihsg-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 15px;
    color: #a1aab8;
    font-size: 9px;
}

.tm-ihsg-footer strong {
    color: #64748b;
    font-weight: 800;
}

/* LOADING */

.tm-ihsg-loading {
    padding: 28px 18px;
    color: #64748b;
    font-size: 12px;
}

/* MOBILE */

@media (max-width: 768px) {

    .tm-ihsg-top {
        align-items: flex-start;
        min-height: 68px;
        padding: 13px 14px;
    }

    .tm-ihsg-mark {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }

    .tm-ihsg-label {
        font-size: 12px;
    }

    .tm-ihsg-main {
        display: block;
    }

    .tm-ihsg-price {
        font-size: 22px;
    }

    .tm-ihsg-change {
        display: block;
        margin-top: 4px;
        font-size: 10px;
    }

    .tm-ihsg-chart-wrap {
        height: 125px;
        padding: 8px 8px 2px;
    }

    #tm-ihsg-chart {
        height: 115px;
    }

    .tm-ihsg-stats {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .tm-ihsg-stat {
        padding: 10px 11px;
    }

    .tm-ihsg-stat:nth-child(3) {
        border-right: 0;
    }

    .tm-ihsg-stat:nth-child(4),
    .tm-ihsg-stat:nth-child(5) {
        border-top: 1px solid #eef0f4;
    }

    .tm-ihsg-stat:nth-child(4) {
        border-right: 1px solid #eef0f4;
    }

    .tm-ihsg-stat:last-child {
        grid-column: span 2;
        border-right: 0;
    }

    .tm-ihsg-footer {
        padding: 7px 11px;
        font-size: 8px;
    }
}
