/* Fix for sentiment tag overflow with long labels like "MODESTLY BULLISH" */

/* Ensure sentiment cells have enough width for long labels */
.sentiment-cell {
    min-width: 140px !important;
    text-align: left !important; /* Force left alignment */
    padding: 4px 2px !important; /* Minimal padding to maximize space */
}

/* Fix sentiment tag layout to prevent overflow and line breaks */
.sentiment-tag.sentiment-tag-clean.sentiment-height-width,
.sentiment-tag {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    padding: 3px 6px !important;
    width: 100% !important;
    margin: 0 !important; /* Remove any auto margins */
    box-sizing: border-box !important;
    white-space: nowrap !important;
    height: 24px !important;
    gap: 4px !important;
}

/* Sentiment label should be flexible but NEVER break to new line */
.sentiment-tag .sentiment-label {
    font-size: 10px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* Sentiment score with flex positioning */
.sentiment-tag .sentiment-score {
    flex: 0 0 auto !important;
    min-width: 20px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: center !important;
    white-space: nowrap !important;
    background-color: transparent !important;
    line-height: 1 !important;
}

/* Special handling for "MODESTLY" labels - use even smaller font */
.sentiment-tag.sentiment-score-41 .sentiment-label,
.sentiment-tag.sentiment-score-42 .sentiment-label,
.sentiment-tag.sentiment-score-43 .sentiment-label,
.sentiment-tag.sentiment-score-44 .sentiment-label,
.sentiment-tag.sentiment-score-45 .sentiment-label,
.sentiment-tag.sentiment-score-46 .sentiment-label,
.sentiment-tag.sentiment-score-47 .sentiment-label,
.sentiment-tag.sentiment-score-48 .sentiment-label,
.sentiment-tag.sentiment-score-56 .sentiment-label,
.sentiment-tag.sentiment-score-57 .sentiment-label,
.sentiment-tag.sentiment-score-58 .sentiment-label,
.sentiment-tag.sentiment-score-59 .sentiment-label {
    font-size: 8px !important;
}

/* Responsive adjustments - maintain single line */
@media (max-width: 1204px) {
    .sentiment-cell {
        min-width: 130px !important;
    }
    
    /* Force all labels to be smaller to fit */
    .sentiment-tag .sentiment-label {
        font-size: 8px !important;
        letter-spacing: -0.5px !important;
    }
    
    .sentiment-tag .sentiment-score {
        font-size: 9px !important;
    }
    
    /* Extra small font for MODESTLY labels */
    .sentiment-tag.sentiment-score-41 .sentiment-label,
    .sentiment-tag.sentiment-score-42 .sentiment-label,
    .sentiment-tag.sentiment-score-43 .sentiment-label,
    .sentiment-tag.sentiment-score-44 .sentiment-label,
    .sentiment-tag.sentiment-score-45 .sentiment-label,
    .sentiment-tag.sentiment-score-46 .sentiment-label,
    .sentiment-tag.sentiment-score-47 .sentiment-label,
    .sentiment-tag.sentiment-score-48 .sentiment-label,
    .sentiment-tag.sentiment-score-56 .sentiment-label,
    .sentiment-tag.sentiment-score-57 .sentiment-label,
    .sentiment-tag.sentiment-score-58 .sentiment-label,
    .sentiment-tag.sentiment-score-59 .sentiment-label {
        font-size: 7px !important;
        letter-spacing: -0.5px !important;
    }
}

/* Critical fix for 1144px and below */
@media (max-width: 1144px) {
    /* Just use smaller font for MODESTLY labels */
    .sentiment-tag.sentiment-score-41 .sentiment-label,
    .sentiment-tag.sentiment-score-42 .sentiment-label,
    .sentiment-tag.sentiment-score-43 .sentiment-label,
    .sentiment-tag.sentiment-score-44 .sentiment-label,
    .sentiment-tag.sentiment-score-45 .sentiment-label,
    .sentiment-tag.sentiment-score-46 .sentiment-label,
    .sentiment-tag.sentiment-score-47 .sentiment-label,
    .sentiment-tag.sentiment-score-48 .sentiment-label,
    .sentiment-tag.sentiment-score-56 .sentiment-label,
    .sentiment-tag.sentiment-score-57 .sentiment-label,
    .sentiment-tag.sentiment-score-58 .sentiment-label,
    .sentiment-tag.sentiment-score-59 .sentiment-label {
        font-size: 7px !important;
        letter-spacing: -0.5px !important;
    }
    
    /* Adjust tag height for smaller screens */
    .sentiment-tag {
        min-width: 90px !important;
        height: 20px !important;
    }
    
    .sentiment-tag .sentiment-score {
        font-size: 9px !important;
    }
}

/* Specific fix for problematic range 1144px-990px */
@media (max-width: 1144px) and (min-width: 990px) {
    .sentiment-cell {
        min-width: 120px !important;
    }
    
    /* Force all labels to be very small */
    .sentiment-tag .sentiment-label {
        font-size: 7px !important;
        letter-spacing: -0.5px !important;
    }
    
    .sentiment-tag .sentiment-score {
        font-size: 8px !important;
    }
    
    /* Extra small for MODESTLY labels in this range */
    .sentiment-tag.sentiment-score-41 .sentiment-label,
    .sentiment-tag.sentiment-score-42 .sentiment-label,
    .sentiment-tag.sentiment-score-43 .sentiment-label,
    .sentiment-tag.sentiment-score-44 .sentiment-label,
    .sentiment-tag.sentiment-score-45 .sentiment-label,
    .sentiment-tag.sentiment-score-46 .sentiment-label,
    .sentiment-tag.sentiment-score-47 .sentiment-label,
    .sentiment-tag.sentiment-score-48 .sentiment-label,
    .sentiment-tag.sentiment-score-56 .sentiment-label,
    .sentiment-tag.sentiment-score-57 .sentiment-label,
    .sentiment-tag.sentiment-score-58 .sentiment-label,
    .sentiment-tag.sentiment-score-59 .sentiment-label {
        font-size: 6px !important;
        letter-spacing: -0.8px !important;
    }
}

/* Specific fix for problematic range 815px-650px */
@media (max-width: 815px) and (min-width: 650px) {
    .sentiment-cell {
        min-width: 105px !important;
    }
    
    .sentiment-tag .sentiment-label {
        font-size: 6px !important;
        letter-spacing: -0.6px !important;
    }
    
    .sentiment-tag .sentiment-score {
        font-size: 7px !important;
    }
    
    /* Ultra small for MODESTLY labels */
    .sentiment-tag.sentiment-score-41 .sentiment-label,
    .sentiment-tag.sentiment-score-42 .sentiment-label,
    .sentiment-tag.sentiment-score-43 .sentiment-label,
    .sentiment-tag.sentiment-score-44 .sentiment-label,
    .sentiment-tag.sentiment-score-45 .sentiment-label,
    .sentiment-tag.sentiment-score-46 .sentiment-label,
    .sentiment-tag.sentiment-score-47 .sentiment-label,
    .sentiment-tag.sentiment-score-48 .sentiment-label,
    .sentiment-tag.sentiment-score-56 .sentiment-label,
    .sentiment-tag.sentiment-score-57 .sentiment-label,
    .sentiment-tag.sentiment-score-58 .sentiment-label,
    .sentiment-tag.sentiment-score-59 .sentiment-label {
        font-size: 5px !important;
        letter-spacing: -0.8px !important;
    }
}

@media (max-width: 768px) {
    .sentiment-cell {
        min-width: 110px !important;
    }
    
    .sentiment-tag .sentiment-label {
        font-size: 7px !important;
        letter-spacing: -0.5px !important;
    }
    
    .sentiment-tag .sentiment-score {
        font-size: 8px !important;
    }
    
    /* Extra small font for long labels on mobile */
    .sentiment-tag.sentiment-score-41 .sentiment-label,
    .sentiment-tag.sentiment-score-42 .sentiment-label,
    .sentiment-tag.sentiment-score-43 .sentiment-label,
    .sentiment-tag.sentiment-score-44 .sentiment-label,
    .sentiment-tag.sentiment-score-45 .sentiment-label,
    .sentiment-tag.sentiment-score-46 .sentiment-label,
    .sentiment-tag.sentiment-score-47 .sentiment-label,
    .sentiment-tag.sentiment-score-48 .sentiment-label,
    .sentiment-tag.sentiment-score-56 .sentiment-label,
    .sentiment-tag.sentiment-score-57 .sentiment-label,
    .sentiment-tag.sentiment-score-58 .sentiment-label,
    .sentiment-tag.sentiment-score-59 .sentiment-label {
        font-size: 6px !important;
        letter-spacing: -0.7px !important;
    }
}

/* Ultra-high specificity overrides to prevent wrapping */
html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-tag-clean.sentiment-height-width {
    overflow: hidden !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
}

html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-label {
    max-width: calc(100% - 25px) !important;
    white-space: nowrap !important;
    display: inline-block !important;
}

html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-score {
    white-space: nowrap !important;
    display: inline-block !important;
}

/* Force single line layout */
html body table#price-table tbody tr td.sentiment-cell .sentiment-tag {
    height: auto !important;
    min-height: 20px !important;
    max-height: 24px !important;
    line-height: 1 !important;
}

/* Extra specific rules for problematic breakpoints */
@media (max-width: 1144px) and (min-width: 990px) {
    /* Reduce name column width to give space to sentiment */
    html body table#price-table thead tr th.header-cell.header-name,
    html body table#price-table thead tr th:nth-child(1),
    html body table#price-table tbody tr td.coin-cell,
    html body table#price-table tbody tr td:nth-child(1),
    .header-name,
    .coin-cell {
        width: 120px !important;
        min-width: 120px !important;
        max-width: 120px !important;
    }
    
    /* Give sentiment column more space (extra space from name column) */
    html body table#price-table thead tr th.header-cell.header-sentiment,
    html body table#price-table thead tr th:nth-child(3),
    html body table#price-table tbody tr td.sentiment-cell,
    html body table#price-table tbody tr td:nth-child(3),
    .header-sentiment,
    .sentiment-cell {
        width: 180px !important;
        min-width: 180px !important;
        max-width: 180px !important;
    }
    
    /* Remove all width/margin constraints from sentiment cell */
    html body table#price-table tbody tr td.sentiment-cell {
        margin: 0 !important;
        text-align: left !important;
        padding: 1px !important;
    }
    
    /* Remove all width/margin constraints from sentiment tag */
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        display: flex !important;
        padding: 2px 3px !important;
        height: 18px !important;
        box-sizing: border-box !important;
    }
    
    /* With more space available, use larger consistent text */
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-label {
        font-size: 8px !important;
        padding-right: 2px !important;
        line-height: 1 !important;
    }
    
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-score {
        font-size: 9px !important;
        line-height: 1 !important;
    }
    
    /* Slightly smaller for all MODESTLY labels but consistent */
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-41 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-42 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-43 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-44 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-45 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-46 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-47 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-48 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-56 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-57 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-58 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-59 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-60 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-61 .sentiment-label {
        font-size: 7px !important;
        letter-spacing: -0.3px !important;
    }
}

/* Specific fix for 730px-700px - hide volatility column */
@media screen and (max-width: 730px) and (min-width: 700px) {
    /* Hide volatility column header and data cells */
    html body div.table-responsive table#price-table.table thead.table-header-modern tr th.header-cell.header-volatility,
    html body div.table-responsive table#price-table thead tr th.header-volatility,
    html body table#price-table thead.table-header-modern tr th:nth-child(5),
    html body table#price-table.table thead tr th:nth-child(5),
    html body table#price-table thead tr th:nth-child(5),
    table#price-table thead tr th:nth-child(5),
    #price-table thead th:nth-child(5),
    #price-table th:nth-child(5),
    .header-cell.header-volatility,
    .header-volatility,
    th.header-volatility,
    html body div.table-responsive table#price-table.table tbody tr td.volatility-cell,
    html body div.table-responsive table#price-table tbody tr td.volatility-cell,
    html body table#price-table tbody tr td.volatility-cell,
    html body table#price-table.table tbody tr td:nth-child(5),
    html body table#price-table tbody tr td:nth-child(5),
    table#price-table tbody tr td:nth-child(5),
    #price-table tbody td:nth-child(5),
    #price-table td:nth-child(5),
    .volatility-cell,
    td.volatility-cell {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }
    
    /* Force hide volatility with style attribute override */
    [class*="volatility"][style],
    [data-volatility][style],
    .volatility-cell[style],
    td.volatility-cell[style] {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
    }
    
    /* With volatility hidden, give sentiment more space */
    html body table#price-table tbody tr td.sentiment-cell {
        min-width: 120px !important;
        max-width: none !important;
        text-align: left !important;
        padding: 2px !important;
    }
    
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        padding: 2px 4px !important;
        height: 20px !important;
    }
    
    /* Small text but not as extreme */
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-label {
        font-size: 6px !important;
        padding-right: 2px !important;
    }
    
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-score {
        font-size: 7px !important;
    }
}

/* New breakpoint for 990px-815px - show 24h % change and adjust columns */
@media (max-width: 990px) and (min-width: 815px) {
    /* Show 24h % change column headers that were hidden - ultra high specificity */
    html body div.table-responsive table#price-table.table thead.table-header-modern tr th.header-cell.header-change[class],
    html body div.table-responsive table#price-table.table thead.table-header-modern tr th:nth-child(7)[class],
    html body table#price-table thead.table-header-modern tr th:nth-child(7)[class],
    html body table#price-table.table thead tr th:nth-child(7)[class],
    html body table#price-table thead tr th:nth-child(7),
    html body #price-table thead th:nth-child(7),
    table#price-table thead tr th:nth-child(7),
    #price-table thead th:nth-child(7),
    #price-table th:nth-child(7),
    .header-cell.header-change,
    th.header-change {
        display: table-cell !important;
        visibility: visible !important;
        width: auto !important;
        min-width: 80px !important;
        max-width: 100px !important;
        padding: 12px 8px !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        opacity: 1 !important;
        position: static !important;
        left: auto !important;
        font-weight: 600 !important;
        text-align: center !important;
        color: #374151 !important;
    }
    
    /* Show 24h % change column data cells that were hidden */
    html body div.table-responsive table#price-table.table tbody tr td.change-cell,
    html body table#price-table tbody tr td.change-cell,
    html body table#price-table.table tbody tr td:nth-child(7),
    table#price-table tbody tr td:nth-child(7),
    #price-table tbody td:nth-child(7),
    #price-table td:nth-child(7),
    .change-cell,
    td.change-cell {
        display: table-cell !important;
        visibility: visible !important;
        width: auto !important;
        min-width: 80px !important;
        max-width: 100px !important;
        padding: 8px 4px !important;
        margin: 0 !important;
        border: none !important;
        background: transparent !important;
        opacity: 1 !important;
        position: static !important;
        left: auto !important;
        text-align: right !important;
        font-weight: 600 !important;
    }
    
    /* Reduce name column width by 15% */
    html body table#price-table thead tr th.header-cell.header-name,
    html body table#price-table thead tr th:nth-child(1),
    html body table#price-table tbody tr td.coin-cell,
    html body table#price-table tbody tr td:nth-child(1),
    .header-name,
    .coin-cell {
        width: 100px !important;
        min-width: 100px !important;
        max-width: 100px !important;
    }
    
    /* Adjust sentiment column for this range */
    html body table#price-table tbody tr td.sentiment-cell {
        min-width: 110px !important;
        max-width: none !important;
        text-align: left !important;
        padding: 2px !important;
    }
    
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        padding: 2px 4px !important;
        height: 20px !important;
    }
    
    /* Font sizes for this range */
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-label {
        font-size: 7px !important;
        padding-right: 2px !important;
    }
    
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-score {
        font-size: 8px !important;
    }
    
    /* Smaller font for MODESTLY labels */
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-41 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-42 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-43 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-44 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-45 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-46 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-47 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-48 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-56 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-57 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-58 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-59 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-60 .sentiment-label,
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag.sentiment-score-61 .sentiment-label {
        font-size: 6px !important;
        letter-spacing: -0.3px !important;
    }
}

@media (max-width: 815px) and (min-width: 650px) {
    html body table#price-table tbody tr td.sentiment-cell {
        min-width: 95px !important;
        max-width: none !important;
        text-align: left !important;
        padding: 2px !important;
    }
    
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag {
        width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        padding: 2px 4px !important;
    }
    
    /* Ultra small text for this range */
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-label {
        font-size: 5px !important;
        padding-right: 2px !important;
    }
    
    html body table#price-table tbody tr td.sentiment-cell .sentiment-tag .sentiment-score {
        font-size: 6px !important;
    }
}

/* Removed absolute positioning from media query - now applied globally above */

/* Nuclear option - force inline display */
html body table#price-table tbody tr td.sentiment-cell span.sentiment-tag.sentiment-tag-clean.sentiment-height-width span.sentiment-label,
html body table#price-table tbody tr td.sentiment-cell span.sentiment-tag.sentiment-tag-clean.sentiment-height-width span.sentiment-score {
    float: none !important;
    vertical-align: middle !important;
}

/* Ensure sentiment cell doesn't wrap its content */
html body table#price-table tbody tr td.sentiment-cell {
    white-space: nowrap !important;
    overflow: hidden !important;
}

/* Nuclear override for sentiment tag centering issues */
html body div table#price-table tbody tr td.sentiment-cell span.sentiment-tag,
html body table#price-table tbody tr td.sentiment-cell span.sentiment-tag,
table#price-table td.sentiment-cell .sentiment-tag,
td.sentiment-cell .sentiment-tag,
.sentiment-cell .sentiment-tag {
    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
}