/* =========================================================
   PriceToWorth - Stock details data table
   Scope: #stockTable only.
   Purpose: LTR key/value stock summary with unified PriceToWorth status tones.
   ========================================================= */

#contentTable {
    direction: ltr !important;
}

#stockTable,
#stockTable * {
    direction: ltr !important;
    box-sizing: border-box !important;
}

#stockTable {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: fixed !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #dfe7ef !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045) !important;
}

#stockTable thead,
#stockTable .top_table,
#stockTable .head,
#stockTable .sort-column {
    display: none !important;
}

#stockTable tbody,
#stockTable tr {
    display: block !important;
    width: 100% !important;
}

#stockTable tr {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #ffffff !important;
}

#stockTable td.content_value {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(180px, 56%) minmax(0, 44%) !important;
    align-items: stretch !important;
    width: 100% !important;
    min-height: 48px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #e8eef5 !important;
    text-align: left !important;
    background: #ffffff !important;
}

#stockTable td.content_value:nth-child(even) {
    background: #fbfdff !important;
}

#stockTable td.content_value:last-child {
    border-bottom: 0 !important;
}

#stockTable td.content_value::before {
    content: attr(data-label) !important;
    position: static !important;
    inset: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-height: 48px !important;
    padding: 11px 15px !important;
    text-align: left !important;
    white-space: normal !important;
    line-height: 1.45 !important;
    color: #ffffff !important;
    font-size: 0.82rem !important;
    font-weight: 850 !important;
    letter-spacing: .005em !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: linear-gradient(90deg, #05283B 0%, #0A3A4D 52%, #145E73 100%) !important;
    z-index: 1 !important;
}

#stockTable td.content_value:nth-child(even)::before {
    background: linear-gradient(90deg, #062F45 0%, #0B4156 52%, #17677C 100%) !important;
}

#stockTable td.content_value .content_divtxt {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 9px 14px !important;
    float: none !important;
    text-align: center !important;
    line-height: 1.45 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    color: #1f2a37 !important;
    background: #ffffff !important;
    font-size: 0.86rem !important;
    font-weight: 750 !important;
    font-variant-numeric: tabular-nums !important;
}

#stockTable td.content_value:nth-child(even) .content_divtxt {
    background: #fbfdff !important;
}

/* Value chips: unified with the stock details status palette. */
#stockTable td.content_value .content_divtxt.ptw-table-value--positive,
#stockTable td.content_value .content_divtxt.ptw-table-value--negative,
#stockTable td.content_value .content_divtxt.ptw-table-value--neutral,
#stockTable td.content_value .content_divtxt.ptw-table-value--info,
#stockTable td.content_value .content_divtxt.ptw-table-value--muted,
#stockTable td.content_value .content_divtxt.bold-green,
#stockTable td.content_value .content_divtxt.bold-lime,
#stockTable td.content_value .content_divtxt.bold-orange,
#stockTable td.content_value .content_divtxt.bold-red {
    justify-content: center !important;
    border-left: 4px solid transparent !important;
    font-weight: 900 !important;
}

#stockTable td.content_value .content_divtxt.ptw-table-value--positive,
#stockTable td.content_value .content_divtxt.bold-green,
#stockTable td.content_value .content_divtxt.bold-lime,
#stockTable .content_divtxt.ptw-table-value--positive,
#stockTable .content_divtxt.bold-green,
#stockTable .content_divtxt.bold-lime,
#stockTable .bold-green,
#stockTable .bold-lime {
    color: #0f9f5f !important;
    background: #ecfdf3 !important;
    border-left-color: #12b76a !important;
}

#stockTable td.content_value .content_divtxt.ptw-table-value--negative,
#stockTable td.content_value .content_divtxt.bold-red,
#stockTable .content_divtxt.ptw-table-value--negative,
#stockTable .content_divtxt.bold-red,
#stockTable .bold-red {
    color: #d92d20 !important;
    background: #fef3f2 !important;
    border-left-color: #f04438 !important;
}

#stockTable td.content_value .content_divtxt.ptw-table-value--neutral,
#stockTable td.content_value .content_divtxt.bold-orange,
#stockTable .content_divtxt.ptw-table-value--neutral,
#stockTable .content_divtxt.bold-orange,
#stockTable .bold-orange {
    color: #c57a10 !important;
    background: #fffaeb !important;
    border-left-color: #f79009 !important;
}

#stockTable td.content_value .content_divtxt.ptw-table-value--info,
#stockTable .content_divtxt.ptw-table-value--info {
    color: #175cd3 !important;
    background: #eef4ff !important;
    border-left-color: #1570ef !important;
}

#stockTable td.content_value .content_divtxt.ptw-table-value--muted,
#stockTable .content_divtxt.ptw-table-value--muted {
    color: #667085 !important;
    background: #f2f4f7 !important;
    border-left-color: #98a2b3 !important;
    font-weight: 800 !important;
}

#stockTable .arrow-up::before,
#stockTable .arrow-down::before {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 950 !important;
}

#stockTable .arrow-up::before {
    content: "↑" !important;
    color: #0f9f5f !important;
    background: rgba(18, 183, 106, 0.14) !important;
}

#stockTable .arrow-down::before {
    content: "↓" !important;
    color: #d92d20 !important;
    background: rgba(240, 68, 56, 0.14) !important;
}

#stockTable::before,
#stockTable::after,
table#stockTable::before,
table#stockTable::after {
    content: none !important;
    display: none !important;
}

@media (max-width: 575.98px) {
    #stockTable {
        border-radius: 14px !important;
    }

    #stockTable td.content_value {
        grid-template-columns: minmax(142px, 57%) minmax(0, 43%) !important;
        min-height: 44px !important;
    }

    #stockTable td.content_value::before,
    #stockTable td.content_value .content_divtxt {
        min-height: 44px !important;
        padding: 9px 10px !important;
        font-size: 0.76rem !important;
        line-height: 1.42 !important;
    }

    #stockTable .arrow-up::before,
    #stockTable .arrow-down::before {
        width: 16px !important;
        height: 16px !important;
        font-size: 11px !important;
    }
}
