.live-chart-tab {
    width: 100%;
    /*height: 100%;*/
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.live-chart-tab #stock-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-direction: column;
    position: relative;
}
.live-chart-tab #stock-wrapper a {
    display: none;
}

.live-chart-tab #stock-wrapper #right-live-chart {
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}
.live-chart-tab #stock-wrapper #right-live-chart.show {
    opacity: 1;
    pointer-events: auto;
}

.live-chart-tab #stock-wrapper #no-selected-stock-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    padding: 16px;
    background: var(--color-button-primary);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}
.live-chart-tab #stock-wrapper #no-selected-stock-message.show {
    opacity: 1;
    pointer-events: auto;
}
.live-chart-tab #stock-wrapper #no-selected-stock-message p {
    color: var(--color-text-primary);
    text-align: center;
}


.live-chart-tab #right-average-volume {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.live-chart-tab #right-average-volume.show {
    display: flex;
}

.live-chart-tab #right-average-volume .title {
    font-size: 16px;
    color: var(--color-text-primary);
}

.live-chart-tab #right-average-volume .volume-container {
    width: 100%;
    height: 24px;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.live-chart-tab #right-average-volume .volume-container .grey-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-button-primary);
    border-radius: 4px;
}

.live-chart-tab #right-average-volume .volume-container .active-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--color-button-accent);
    border-radius: 4px;
    transition: width 200ms;
}

.live-chart-tab #right-average-volume .legend {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.live-chart-tab #right-average-volume .legend p {
    font-size: 12px;
    color: var(--color-text-primary);
}



.live-chart-tab .time-range-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.live-chart-tab .time-range-wrapper .item {
    width: 60px;
    height: 28px;
    font-size: 12px;
    border: 1px solid transparent;
    background: var(--color-button-tertiary);
    color: var(--color-text-primary);
    /*border: 1px solid var(--color-bg-lighter);*/
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 250ms;
    cursor: pointer;
}

.live-chart-tab .time-range-wrapper .item:hover {
    border: 1px solid var(--color-border-hover);
}

.live-chart-tab .time-range-wrapper .item.active {
    background: var(--color-button-primary);
    /*border: 1px solid var(--color-bg-btn-controls-active);*/
}

.live-chart-tab .right-chart-hover-popup {
    position: fixed;
    display: none;
    width: 165px;
    background: var(--color-bg-page);
    border: 1px solid var(--color-border-popup);
    border-radius: 8px;
    padding: 8px;
    color: var(--color-text-primary);
    font-size: 12px;
    flex-direction: column;
    gap: 8px;
}

.live-chart-tab .right-chart-hover-popup.show {
    display: flex;
}

.live-chart-tab .right-chart-hover-popup .date {
    text-align: center;
}

.live-chart-tab .right-chart-hover-popup .event {
    font-weight: 700;
    text-align: center;
    margin-top: 8px;
}

/* Fullscreen mode - maximize chart */
.right-wrapper.financials-expanded .live-chart-tab {
    height: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.right-wrapper.financials-expanded .live-chart-tab #stock-wrapper {
    flex: 1;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.right-wrapper.financials-expanded .live-chart-tab #stock-wrapper #right-live-chart {
    width: 100% !important;
    height: 100% !important;
    flex: 1;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.right-wrapper.financials-expanded .live-chart-tab .chart-container {
    /*height: 380px !important;*/
    /*width: auto !important;*/
    /*max-width: 100% !important;*/
    flex: 0 0 auto;
    margin: 0 auto;
}

.right-wrapper.financials-expanded .live-chart-tab .chart-container .chart-content {
    /*width: 100% !important;*/
    /*height: calc(100% - 135px) !important;*/
    display: flex;
    flex-direction: column;
}

.right-wrapper.financials-expanded .live-chart-tab .chart-container .chart-content .tv-lightweight-charts {
    /*width: 100% !important;*/
    /*height: 100% !important;*/
    flex: 1;
    min-height: 0;
}

.right-wrapper.financials-expanded .live-chart-tab .chart-container .chart-content .tv-lightweight-charts table {
    /*width: 100% !important;*/
    /*height: 100% !important;*/
}

/* Chart Header Styles */
.chart-header {
    background: var(--color-bg-block) !important;
    color: var(--color-text-primary) !important;
    padding: 16px !important;
    margin-bottom: 10px !important;
    border-radius: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    text-align: left !important;
}

.chart-header-company-name {
    font-size: 18px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    white-space: nowrap;    
    overflow: hidden;         
    text-overflow: ellipsis; 
}

#right-live-chart .chart-header-price-container,
#right-live-chart .chart-header-date-container {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
#right-live-chart .chart-header-date-container {
    font-size: 12px;
    line-height: 16px;
    font-weight: normal;
    color: var(--color-text-tertiary);
}
#right-live-chart .chart-header-price-container  .chart-header-price-left-side,
#right-live-chart .chart-header-price-container  .chart-header-price-right-side,
#right-live-chart .chart-header-date-container .chart-header-date-status,
#right-live-chart .chart-header-date-container  .chart-header-date-status {
    width: calc(50% - 6px);
    display: flex;
    align-items: center;
    gap: 4px;
}

#right-live-chart .chart-header-price-container .chart-header-price {
    font-size: 18px;
    font-weight: bold;
    line-height: 20px;
}
#right-live-chart .chart-header-price-container .chart-header-change {
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    transition: color 200ms ease;
}
#right-live-chart .chart-header-price-container .chart-header-change.positive-change {
    color: var(--color-icon-positive)
}
#right-live-chart .chart-header-price-container .chart-header-change.negative-change {
    color: var(--color-icon-negative)
}
