/* ====================================
   Table Components
   ==================================== */

/* Result Table */
.result-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    table-layout: fixed;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: none;
    /* overflow: hidden; */
    /* Removing to allow sticky header to work */
    box-shadow: var(--shadow-inset);
    padding: 0;
}

.result-table thead tr {
    /* box-shadow: var(--shadow-raised); */
    /* background: var(--bg-primary); */
    border-radius: 0;
}

.result-table th {
    padding: 14px 10px;
    color: var(--text-accent);
    background: var(--bg-primary);
    border: none !important;
    outline: none !important;
    text-align: left;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 10;
    margin-bottom: 0;
}

.result-table th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 0;
    padding-left: 20px;
}

.result-table th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 0;
    padding-right: 20px;
}

/* Table Body */
.result-table tbody tr {
    background: transparent;
    box-shadow: none;
    transform: none;
    transition: none;
}

.result-table tbody tr:hover {
    transform: none;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.02);
}

/* Table Cells */
.result-table td {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    text-align: left;
    font-size: 12px;
    background: transparent;
    border-top: none;
}

.result-table td:first-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 20px;
}

.result-table td:last-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding-right: 20px;
}

.result-table tr:last-child td {
    border-bottom: none;
}

/* Cell States */
.result-table td.success {
    background: transparent;
    color: var(--color-success);
    font-weight: 700;
}

.result-table td.failed {
    color: var(--color-failed);
    font-weight: 700;
}

.result-table td.info {
    color: var(--color-info);
    font-weight: 700;
    font-style: italic;
}

.result-table td.message-cell {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column Widths */
.result-table th:nth-child(1),
.result-table td:nth-child(1) {
    width: 50px;
    /* No. */
}

.result-table th:nth-child(2),
.result-table td:nth-child(2) {
    width: 100px;
    /* BROWSER */
}

.result-table th:nth-child(3),
.result-table td:nth-child(3) {
    width: 130px;
    /* Number */
}

.result-table th:nth-child(4),
.result-table td:nth-child(4) {
    width: 100px;
    /* Status */
}

.result-table th:nth-child(5),
.result-table td:nth-child(5) {
    width: 80px;
    /* Time */
}

/* Message Column (Keep original padding) */
.result-table th:nth-child(6),
.result-table td:nth-child(6) {
    padding: 12px 20px;
}

/* Special Row Types */
.result-table tr[data-type="progress-info"] td {
    font-weight: 600 !important;
    padding: 10px 12px !important;
    border-bottom: 2px solid #FF9800 !important;
}

.result-table tr[data-type="progress-info"] td:nth-child(3) {
    color: #FF9800 !important;
    font-weight: 700 !important;
    font-style: italic;
}

.result-table tr td:nth-child(3).success {
    color: green;
    font-weight: 700;
}

.result-table tr td:nth-child(3).failed {
    color: var(--color-failed);
    font-weight: 700;
}

/* Result Actions */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: -5px;
    border: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.global-section .result-actions {
    margin-top: 15px;
    margin-bottom: 0;
}

/* Pagination Controls */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    padding: 10px 15px;
    background: var(--bg-secondary);
    border-radius: 12px;
    box-shadow: var(--shadow-inset);
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-pag {
    background: var(--bg-primary);
    border: none;
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-pag:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-pag:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}