:root {
    --container-min-height: 250px;
    --container-max-height: 600px;
    --primary-color: #111111;
    --secondary-color: #ecf0f1;
    --background-color: #111111;
    --border-color: #222222;
    --chart-bg: #000000;
    --text-color: #ecf0f1;
    --highlight-color: #3498db;
    --live-indicator: #2ecc71;
    --body-bg: #000000;
    --card-bg: #111111;
    --chart-bg-transparent: rgba(0, 0, 0, 0.5);
    --yellow-line: #e9ca08;
    --blue-line: #6f9ae0;
    --green-line: #00ff00;
    --transparent-bg: rgba(0, 0, 0, 0.0);
    --transparent-panel: rgba(17, 17, 17, 0.8);
    --transparent-chart: rgba(0, 0, 0, 0.3);
}

.real-time-wrapper {
    background-color: rgba(17, 17, 17, 0.1); /* dark with 80% opacity */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    
}
#main-container {
    height: 260px;
}
.slide-bar {
    height: 20px;
    background-color: var(--theme-sidebar-color);
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--theme-border-color);
  
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

    .slide-bar::after {
        content: "▲";
        color: var(--text-color);
        font-size: 10px;
    }

    .slide-bar.expanded::after {
        content: "▼";
        color: var(--text-color);
        font-size: 14px;
    }

.real-time-container {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    position: relative;
    transform-origin: bottom;
    background-color: rgba(0, 0, 0, 0.5); /* add transparent base */
}

    .real-time-container.expanded {
        height: auto;
        max-height: var(--container-max-height);
    }

    .real-time-container .header {
        background-color: rgba(31, 31, 31, 0.5);
        padding: 8px 15px;
        font-size: 14px;
        font-weight: bold;
        border-bottom: 1px solid var(--border-color);
        height: 25px;
    }
/* New container for scroll area and arrows */
.scroll-area-container {
    display: flex;
    flex-direction: row;
    /* background-color: var(--transparent-bg);*/
    background-color: rgba(0, 0, 0, 0.7);
    position: relative;
    height: calc(100% - 25px);
}

.realtime-scroll-container {
    flex: 1;
    display: flex;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 15px 0; /* Remove horizontal padding */
    -webkit-overflow-scrolling: touch;
    background-color: var(--chart-bg-transparent);
}

    /* Style the scrollbar */
    .realtime-scroll-container::-webkit-scrollbar {
        height: 6px;
        background: transparent;
    }

    .realtime-scroll-container::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 3px;
    }

/* For Firefox */
.realtime-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.realtime-box {
    min-width: calc(33.333% - 20px);
    margin-right: 15px;
    height: 205px;
    background-color: var(--chart-bg-transparent);
    border: 1px solid var(--border-color);
    border-radius: 0;
    padding: 2px 10px;
    position: relative;
}

    .realtime-box:last-child {
        margin-right: 0;
    }

.realtime-placeholder {
    font-weight: bold;
    /* margin-bottom: 10px; */
    color: var(--text-color);
    font-size: 12px;
    height: calc(100% - 32px);
}

.realtime-box .title {
    color: var(--theme-logo-color);
}


@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

@keyframes blink {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

/* Fixed arrow positioning */
.scroll-arrow {
    flex: 0 0 30px; /* Fixed width, don't grow or shrink */
    height: 200px; /* Exactly match the realtime-box height */
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    align-self: center; /* Center vertically in the flex container */
    margin-bottom: 10px; /* Match the padding of realtime-scroll-container */
}

    .scroll-arrow:hover {
        background-color: rgba(0, 0, 0, 0.9);
    }

.scroll-left {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-right {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-arrow::before {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    border-top: 2px solid var(--text-color);
    border-right: 2px solid var(--text-color);
}

.scroll-left::before {
    transform: rotate(-135deg);
    margin-left: 5px;
}

.scroll-right::before {
    transform: rotate(45deg);
    margin-right: 5px;
}


/* Chart grid lines */

.realtime-table {
    width: 100%;
    overflow-y: auto;
}

    .realtime-table table {
        width: 100%;
        table-layout:fixed;
        border-collapse: collapse;
        font-family: Arial, sans-serif;
        font-size: 14px;
        color: #f1f1f1;
        text-align:left;
        background-color: rgba(18, 18, 18, 0.8); /* table bg semi-transparent */
    }

    .realtime-table th {
        text-align: left;
        padding: 5px 16px;
        border-bottom: 1px solid #2e2e2e;
        background-color: rgba(31, 31, 31, 0.5); /* header slightly darker */
    }

    .realtime-table td {
        text-align: left;
        padding: 5px 5px;
        border-bottom: 1px solid #2e2e2e;
    }

    .realtime-table thead {
        background-color: rgba(31, 31, 31, 0.1); /* header slightly darker */
        font-weight: bold;
    }

    .realtime-table tbody tr:hover td {
        background-color: rgba(42, 42, 42, 0.1); /* semi-transparent on hover */
    }

    .realtime-table tbody tr:nth-child(even) {
        background-color: rgba(24, 24, 24, 0); /* even rows */
    }

    .realtime-table tbody tr:nth-child(odd) {
        background-color: rgba(20, 20, 20, 0.2); /* odd rows */
    }

    .realtime-table th:nth-child(2),
    .realtime-table th:nth-child(3),
    .realtime-table td:nth-child(2),
    .realtime-table td:nth-child(3) {
        text-align: right;
    }
    
.realtime-table th:nth-child(3),
.realtime-table td:nth-child(3) {
    width: 55px;
    text-align:right;
}

