﻿/* Homepage Compiled CSS - Stock Market Watch */

/* Base Styles */
.star-icon {
    display: flex;
}

.watchlist-btn.compact {
    border: none;
    min-width: 18px;
    width: 18px;
    height: 18px;
}

/* Layout Grid */
#divMarketToday {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
    column-gap: 35px;
    margin-top: 15px;
}

/* Typography */
h2 {
    font-size: 22px;
}

#divMarketToday h2 {
    font-size: 22px;
}

#divMoversActive {
    font-size: 12.8px;
}

/* Market Session Navigation */
.marketSessionNav {
    padding: 5px;
    margin: 4px 0 0 0;
    text-align: center;
}

    .marketSessionNav a.selected {
        padding: 2px;
        display: inline-block;
        background: #fefebf;
        font-weight: 600;
    }

/* Market Movers Grid */
.moverGridParent {
    min-height: 220px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
}

    .moverGridParent .moveBlock {
        border: 2px solid #ededed;
        border-radius: 8px;
        padding: 0 6px;
    }

    .moverGridParent h3 {
        font-size: 19px;
        text-align: center;
        margin: 5px;
    }

        .moverGridParent h3 a {
            text-decoration: none;
            color: var(--main-font-color);
        }

.moverGrid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.mover_row {
    display: contents;
}

    .mover_row:hover .col {
        background: #ffc;
    }

.moverGrid .col, .col.ld {
    padding: 5px;
    border-top: 1px solid #e4e4e4;
    font-size: 12.8px;
}

.col.col1 {
    display: flex;
    gap: 5px;
    align-items: center;
}

.col.ld {
    height: 26px;
    width: 42px;
    content: "...";
}

.col2, .col3 {
    cursor: default;
}

a.symb {
    font-weight: 600;
}

/* Change Grid Styles */
.chgGrid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 5px;
}

    .chgGrid .item {
        padding: 5px;
        border: 2px solid #6fb77b;
        border-radius: 5px;
        text-align: center;
        line-height: 22px;
        white-space: nowrap;
        overflow: hidden;
    }

/* Market Indexes */
div#MarketIndexes {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-gap: 15px;
}

    div#MarketIndexes .item {
        display: flex;
        flex-direction: row;
        justify-content: space-evenly;
        border-left: none;
        border-right: none;
    }

#MarketIndexes a {
    text-decoration: none;
    color: var(--main-font-color);
}

div#MarketIndexes div {
    line-height: 23px;
    font-size: 16px;
}

#MarketIndexes .title {
    color: #515151;
}

div#MarketSectorsToday .item {
    line-height: 20px;
}

.sessionNote {
    font-size: 11px;
    line-height: 11px;
    margin-left: 4px;
    background: #ffc;
}

.sectLink {
    text-decoration: none !important;
    color: var(--main-font-color);
}

/* Color Classes for Performance */
.chgGrid .good3 {
    background: rgb(52 211 65 / 44%);
    border-color: rgb(16 185 129 / 30%);
    color: rgb(8 84 59);
    font-weight: 600;
    text-shadow: 1px 1px #ffffff6b;
}

.chgGrid .good2 {
    background: rgb(52 211 65 / 24%);
    border-color: rgba(16, 185, 129, 0.18);
    color: #168969;
    font-weight: 600;
}

.chgGrid .good1 {
    background: rgb(52 211 65 / 3%);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--ticker-up-color);
    font-weight: 400;
}

.chgGrid .bad3 {
    background: rgb(255 202 202 / 77%);
    border-color: rgb(232 155 155 / 68%);
    color: rgb(122 19 19);
    font-weight: 600;
}

.chgGrid .bad2 {
    background: rgb(211 52 52 / 5%);
    border-color: rgb(252 178 178 / 50%);
    color: var(--ticker-down-color);
    font-weight: 600;
}

.chgGrid .bad1 {
    background: rgb(211 52 52 / 1%);
    border-color: rgba(248, 113, 113, 0.2);
    color: var(--ticker-down-color);
    font-weight: 400;
}

.good1 .sectName, .bad1 .sectName {
    color: #555;
}

/* News and Content Areas */
.topNewsArea {
    min-height: 178px;
}

.home2ndCol {
    grid-column: span 2;
}

.homeTopRightBox {
    display: grid;
    grid-template-columns: 1fr 250px;
    grid-gap: 5px;
    align-items: center;
}

#MarketHeadlines {
    border: 2px solid var(--curve-box-border-color);
    border-radius: 5px;
    padding: 0 7px;
    min-height: 165px;
    box-sizing: border-box;
}

    #MarketHeadlines a {
        color: #222;
        font-weight: 400;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

.tickerNewsRow {
    margin: 5px 0;
    grid-template-columns: 1fr;
}

    .tickerNewsRow .newsCol1 {
        display: none;
    }

div#upcomingEvents {
    border: 2px solid var(--curve-box-border-color);
    border-radius: 5px;
    padding: 10px;
    max-height: 234px;
    overflow: hidden;
}

.newsCol2 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.eventRow {
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: center;
    gap: 4px;
    border: 2px solid var(--curve-box-border-color);
    border-radius: 5px;
    padding: 7px 4px;
}

.eventTime {
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    line-height: 12px;
}

.eventName {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* News Skeleton Loading */
.news-skeleton {
    background: white;
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 20px;
    max-width: 400px;
    margin: 0 auto;
}

.skeleton {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-headline {
    height: 20px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-headline-2 {
    height: 20px;
    margin-bottom: 8px;
    width: 85%;
}

.skeleton-headline-3 {
    height: 20px;
    margin-bottom: 20px;
    width: 60%;
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

    .skeleton-text:nth-child(5) {
        width: 95%;
    }

    .skeleton-text:nth-child(6) {
        width: 88%;
    }

    .skeleton-text:nth-child(7) {
        width: 92%;
    }

    .skeleton-text:nth-child(8) {
        width: 70%;
        margin-bottom: 20px;
    }

.skeleton-link {
    height: 16px;
    width: 180px;
}

/* Row Details */
.rowDeets {
    box-sizing: border-box;
    width: 750px;
    padding: 2px;
    background: #fff;
    position: absolute;
    border: 2px solid #ccc;
    margin: -222px 0;
    border-radius: 2px;
    box-shadow: #0d0d0d8f 0px 0px 6px 5px;
    z-index: 10;
}

.selectedRow .col {
    background-color: #ffffb6 !important;
}

.rowDeets iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.rowDeets .rowHeading {
    background: #111;
    color: #fff;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 7px;
}

    .rowDeets .rowHeading a {
        color: #c7fcff;
    }

.rowDeets a.closeLink {
    text-align: right;
}

/* News Styles */
.main-article {
    margin-bottom: 2px;
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    display: flex;
    align-items: start;
    gap: 10px;
}

.news-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

    .news-image img {
        width: 48px;
        height: 48px;
        object-fit: cover;
        border-radius: 6px;
    }

.news-content {
    flex-grow: 1;
}

.news-title {
    font-size: 14px;
    line-height: 18px;
    font-weight: bold;
}

.main-article a, .news-grid a {
    text-decoration: none;
}

.news-card {
    border-bottom: 1px solid #ededed;
    padding: 10px 0 10px 15px;
}

.pubdate-breaking {
    font-size: 12px;
    font-weight: bold;
}

.headline-breaking a {
    font-size: 15px;
    text-decoration: none;
}

/* Earnings Styles */
div#earnings-content {
    height: 420px;
    overflow-y: scroll;
}

.earnings-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e1e5e9;
}

.card-header {
    background: #f8f9fa;
    padding: 12px 16px;
    border-bottom: 1px solid #e1e5e9;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
}

.earnings-row {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid #f1f3f4;
    font-size: 12px;
    min-height: 32px;
}

    .earnings-row:last-child {
        border-bottom: none;
    }

.date-column {
    width: 60px;
    flex-shrink: 0;
    font-weight: 500;
    color: #6c757d;
    font-size: 11px;
}

.symbols-column {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

    .symbols-column a {
        text-decoration: none;
        color: #333;
    }

.symbol-tag {
    background: #f7f7f7;
    color: #495057;
    padding: 2px 7px 2px 2px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    grid-gap: 1px;
}

    .symbol-tag.large-cap { 
        color: #333;
    }

    .symbol-tag.mega-cap {
        background: #8393a4;
        color: #fff;
    }

        .symbol-tag.mega-cap a {
            color: #fff;
        }

.loading {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    font-size: 12px;
}

.error {
    padding: 16px;
    text-align: center;
    color: #dc3545;
    font-size: 12px;
}

.no-earnings {
    color: #6c757d;
    font-style: italic;
    font-size: 11px;
}

.today-row-highlight {
    background: #e7f2fc;
}

/* Snippet Summary */
.snippetSummary {
    font-size: 12px;
    line-height: 21px;
    padding: 12px;
    border-radius: 7px;
    background: rgb(248 248 248);
    margin-bottom: 11px;
    min-height: 110px;
    max-height: 110px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

    .snippetSummary::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 20px;
        background: linear-gradient(transparent, rgb(248 248 248));
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .snippetSummary.expanded {
        max-height: none;
    }

        .snippetSummary.expanded::after {
            opacity: 0;
        }

    .snippetSummary:hover {
        background: rgb(245 245 245);
    }

    .snippetSummary .expand-hint {
        position: absolute;
        bottom: 4px;
        right: 8px;
        font-size: 10px;
        color: #666;
        transition: opacity 0.3s ease;
    }

    .snippetSummary.expanded .expand-hint {
        opacity: 0;
    }

    .snippetSummary a {
        text-decoration: none;
        font-weight: bold;
    }

/* Analyst Updates */
.analyst-updates {
    max-width: 600px;
    margin: 15px 0;
}

    .analyst-updates h2 {
        font-size: 18px;
        font-weight: 600;
        margin: 0 0 16px 0;
        color: #333;
    }

.color-key {
    display: flex;
    gap: 16px;
    margin-bottom: 10px;
    padding: 1px 5px;
    border-radius: 6px;
    font-size: 12px;
    flex-wrap: wrap;
}

.key-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.key-box {
    width: 16px;
    height: 16px;
    border: 1px solid;
    border-radius: 3px;
    background: white;
}

    .key-box.strong-buy {
        border-color: #24b524;
    }

    .key-box.buy {
        border-color: #28a745;
        border-style: dotted;
    }

    .key-box.hold {
        border-color: #ebebeb;
    }

    .key-box.sell {
        border-color: #dc3545;
        border-style: dotted;
    }

    .key-box.strong-sell {
        border-color: #dc3545;
    }

.updates-container {
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    height: 420px;
    overflow-y: scroll;
}

.update-row {
    display: flex;
    border-bottom: 1px solid #f1f3f4;
    min-height: 50px;
}

    .update-row:last-child {
        border-bottom: none;
    }

.date-column2 {
    width: 60px;
    padding: 12px 16px;
    font-size: 12px;
    color: #495057;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tickers-column {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ticker {
    display: flex;
    grid-gap: 1px;
    align-items: center;
    padding: 2px 7px 2px 2px;
    border: 1px solid;
    border-radius: 4px;
    background: white;
    font-size: 11px;
    color: #333;
    cursor: pointer;
    position: relative;
}

    .ticker a {
        text-decoration: none;
        color: var(--main-font-color);
    }

    .ticker.strong-buy {
        background: rgb(95 197 118 / 20%);
        border-color: rgb(16 185 129 / 30%);
    }

    .ticker.buy {
        border-color: rgb(16 185 129 / 33%);
        background: rgb(52 211 65 / 1%);
    }

    .ticker.hold {
        border-color: #ebebeb;
    }

    .ticker.sell {
        background: rgb(211 52 52 / 1%);
        border-color: rgb(252 178 178 / 71%);
    }

    .ticker.strong-sell {
        background: rgb(211 52 52 / 8%);
        border-color: rgb(252 178 178 / 65%);
    }

/* Tooltip */
.tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

    .tooltip.show {
        opacity: 1;
        transform: translateY(0);
    }

    .tooltip::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 5px solid transparent;
        border-top-color: #333;
    }

.no-data {
    padding: 16px;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
}

/* Grid Layouts */
.gridRow {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    min-height: 480px;
    gap: 10px;
    margin: 15px 0;
}

.marketOverviewBox {
    min-height: 375px;
}

.blue-text {
    display: block;
    text-align: center;
    font-size: 13px;
}

.indexLable {
    text-align: center;
    color: #069;
    border: 1px solid #e0e3eb;
    padding: 4px;
    font-weight: 700;
    font-size: 18px;
    position: relative;
    background: #fff;
    margin: 0 0 9px 0;
}

.indexChart {
    margin-top: -60px;
}

.mktTopCharts {
    gap: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    margin: 0 0 4px;
}

.indexChart, .topChart {
    overflow: hidden;
}

.adRow1 {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 10px;
}

/* Media Queries */
@media (max-width: 1340px) {
    #rowDetails {
        display: none;
    }
}

@media (max-width: 1300px) {
    #MarketSectorsToday .item {
        font-size: 12px;
    }
}

@media (max-width: 1100px) {
    #divMarketToday {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 950px) {
    .gridRow {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 800px) {
    .container {
        background: #fff;
        padding: 25px 10px;
    }

    .contentArea {
        padding: 4px;
        margin: 10px 0;
    }

    #tblMarketNumbers {
        display: inline-flex;
        align-content: stretch;
        justify-content: center;
    }

        #tblMarketNumbers tr, #tblMarketNumbers td {
            display: table-cell;
        }

    #tdFutures, #tdEconCal {
        border: none !important;
    }

    h1 {
        text-align: center;
    }

    .marketSessionNav {
        font-size: 15px;
    }

        .marketSessionNav span {
            display: block;
        }

    .moverGrid {
        grid-template-columns: repeat(2, 1fr);
    }

        .moverGrid .col2 {
            display: none;
        }

    div#MarketIndexes {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .widgetWLstar {
        display: none;
    }

    #divMarketToday {
        column-gap: 0;
    }

    .chgGrid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .topNewsArea {
        min-height: 255px;
    }

    .home2ndCol {
        grid-column: span 1;
        font-size: 12px;
    }

        .home2ndCol a {
            font-size: 14px;
        }

    .homeTopRightBox {
        display: grid;
        grid-template-columns: 1fr;
        grid-gap: 5px;
        align-items: center;
    }

    .moverGridParent {
        min-height: 225px;
        gap: 4px;
    }

        .moverGridParent h2 {
            font-size: 18px;
        }

    .moverGrid .col {
        padding: 5px 0;
        border-top: 1px solid #e4e4e4;
    }

    .marketSessionNav {
        font-size: 14px;
    }

    .moverGridParent .moveBlock {
        border: 1px solid #f2f2f2;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        border-radius: 7px;
    }
}
