/* Premium Table CSS for Wifaq */

.table-responsive {
    border-radius: 16px;
    background: var(--bg-white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); /* Deep dark shadow */
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: auto; /* Enable vertical & horizontal scroll */
    max-height: calc(100vh - 250px); /* Required to trigger vertical scrolling */
}

.table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-dark);
    border-collapse: separate;
    border-spacing: 0;
    text-align: center;
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color, #6a2a5b), var(--secondary-color, #924075));
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 8px 10px;
    border: none;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: all 0.3s ease;
    background-color: transparent;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(255,255,255,0.02);
}

.table tbody tr:hover {
    background-color: rgba(229, 193, 88, 0.1); /* Soft gold hover */
    cursor: pointer;
}

.table tbody tr:hover td {
    color: var(--accent-gold);
}

.table tbody td {
    padding:2px 2px;
    vertical-align: middle;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

/* First and Last child border radius for elegant look */
.table thead th:first-child {
    border-top-left-radius: 16px;
}

.table thead th:last-child {
    border-top-right-radius: 16px;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 16px;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 16px;
}

/* Custom Scrollbar for tables */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--accent-gold, #d4af37);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color, #6a2a5b);
}

/* Wrapper for adding the premium space around standard tables */
.table-wrapper {
    padding: 20px;
}


/* Override Bootstrap table borders */
.table-bordered > :not(caption) > * {
    border-width: 0;
}
.table-bordered > :not(caption) > * > * {
    border-width: 0;
}