
.history-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.history-table td,
.history-table th {
    padding: 15px;
    text-align: left;
}
.history-table th {
    background: var(--table-header);
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.history-table tr {
    border-bottom: 1px solid var(--border-color);
}
/* Make table rows feel clickable */
.history-table tbody tr.data-row {
    cursor: pointer;
    transition: background-color 0.2s;
}
.history-table tbody tr.data-row:hover {
    background-color: rgba(56, 189, 248, 0.05);
}

/* The hidden source bar */
.source-info-bar {
    display: none;
    /* Hidden by default */
    background-color: var(--table-header);
    border-bottom: 1px solid var(--border-color);
}
/* Update the source bar to span the new column count (3 instead of 4) */
.source-info-bar td {
    padding: 0;
    /* Ensures the inner content controls the spacing */
}

.source-content {
    padding: 15px 25px;
    background-color: var(--table-header);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--accent-color);
    /* Highlight color for the open bar */
}
.source-info-bar.open {
    display: table-row;
    /* Shown when toggled */
}
/* Scrollable Container */
.history-scroll-container {
    max-height: 400px;
    /* Approximately 20 rows of data */
    margin-bottom: 40px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
}

/* Ensure the header stays at the top while scrolling */
.history-table thead th {
    position: sticky;
    top: 0;
    /* Increase z-index to stay above expanding bars */
    z-index: 20;

    /* Use a solid background variable (no transparency) */
    background-color: var(--card-bg) !important;

    /* Ensure text is distinct */
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for depth */
}

/* Custom Scrollbar for better UI (Optional) */
.history-scroll-container::-webkit-scrollbar {
    width: 8px;
}
.history-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}
.history-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
.history-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
