﻿.tab-panel[hidden] {
    display: none !important;
}
.tab-panel {
    flex: 1; /* 남은 공간을 모두 차지 */
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tab-btn.active {
    font-weight: 700;
}

.infoContent {
    height: 100%;
    overflow-y: auto; /* 세로 스크롤만 여기서 */
    overflow-x: hidden;
}

    .infoContent.noHeader {
        height: 100%;
        overflow-y: auto; /* 세로 스크롤만 여기서 */
        overflow-x: hidden;
    }

    .infoContent.daily-panel[hidden] {
        display: none;
    }

    .table-container thead th {
        position: sticky;
        top: 0;
        z-index: 5;
        background-color: #2a2a2a;
    }
/* 추가: 상위 컨테이너들이 전체 높이를 사용하도록 */
.chart-footer {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.chart-tabs {
    flex-shrink: 0; /* 탭 영역은 고정 크기 */
    background-color: #2a2a2a;
}
.filter-section {
    display: flex;
    background-color: #2a2a2a;
    padding: 0px 0;
}

.filter-item {
    padding: 8px 20px;
    color: #888888;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .filter-item.active {
        color: #ffffff;
        font-weight: 500;
    }

    .filter-item:hover {
        color: #cccccc;
    }

.table-container table {
    width: 100%;
    border-collapse: collapse;
}

.table-container table th {
    background-color: #2a2a2a;
    color: #cccccc;
    padding: 10px 15px;
    text-align: center;
    font-weight: normal;
    font-size: 17px;
    border-bottom: 1px solid #404040;
}

.table-container table td {
    padding: 10px 15px;
    text-align: center;
    font-size: 17px;
    border-bottom: 1px solid #404040;
}

.table-container table tr:hover {
    background-color: #333333;
}

.table-container table .date {
    color: #ffffff;
}

    .table-container table .price-up {
        color: var(--red-up);
    }

    .table-container table .price-down {
        color: var(--blue-down);
    }

.table-container table .change-up {
    color: var(--red-up);
}

    .table-container table .change-up::before {
        content: "▲";
        margin-right: 2px;
    }

.table-container table .change-down {
    color: var(--blue-down);
}

    .table-container table .change-down::before {
        content: "▼";
        margin-right: 2px;
    }


.table-container table .percentage {
    color: #ffffff;
}

.table-container table .volume {
    color: #ffffff;
}

.table-container table .price-data {
    color: #ffffff;
}

/* 정확한 컬럼 너비 설정 */
.table-container table .col-number {
    width: 40px;
}

.table-container table .col-date {
    width: 100px;
}

.table-container table .col-price {
    width: 80px;
}

.table-container table .col-change {
    width: 80px;
}

.table-container table .col-percent {
    width: 60px;
}

.table-container table .col-volume {
    width: 120px;
}

.table-container table .col-open {
    width: 80px;
}

.table-container table .col-high {
    width: 80px;
}

.table-container table .col-low {
    width: 80px;
}

span.violet {
    color: #a42695 !important;
}

.table-container tbody.flash tr {
    animation: rowFlash 450ms ease-out;
}

@keyframes rowFlash {
    0% {
        background-color: rgba(255, 230, 0, 0.18);
    }

    100% {
        background-color: transparent;
    }
}

/* 사용자가 모션 줄이기 설정한 경우 애니메이션 끄기 */
@media (prefers-reduced-motion: reduce) {
    .table-container tbody.flash tr {
        animation: none;
    }
}

/* 뷰포트: 버튼의 기준점만 잡아주고 폭은 100% */
#agent-content .table-viewport {
    position: relative;
    width: 100%;
    max-width: 100%;
}

/* 실제 가로 스크롤 박스 */
#agent-content .table-container {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}

    /* 테이블: 내용이 더 넓으면 늘어나고, 내용이 좁으면 최소 100%까지는 채우기 */
    #agent-content .table-container table {
        /* 핵심 */
        min-width: 100%;
        width: max-content;
        border-collapse: collapse;
        white-space: nowrap;
    }

/* 우측 상단 토글 버튼 */
#agent-content .hscroll-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
    padding: 4px 8px;
    border: 0;
    border-radius: 6px;
    background: #3a3a3a;
    color: #fff;
    cursor: pointer;
}

    #agent-content .hscroll-btn:hover {
        background: #444;
    }


/* 상위 컨테이너들은 스크롤 없이 높이만 제공 */
.financial-info {
    padding: 5px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* auto에서 hidden으로 변경 */
}

.financial-table {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* 추가 */
}



    .financial-table th, .financial-table td {
        padding: 4px 10px;
        font-size: 12px;
    }

    .financial-table th {
        font-weight: normal;
        color: var(--text-secondary);
        background-color: var(--bg-lighter);
        position: sticky;
        top: 0;
        z-index: 1;
    }

