﻿/* Hide table initially */
#tableContainer {
    display: none;
}

/* Blinking warning text */
.blinking-red {
    color: #dc3545;
    font-weight: 600;
    animation: blinkRed 1.2s infinite;
}

/* Responsive table */
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 550px;
    -webkit-overflow-scrolling: touch;
}

/* Table */
#memberListTable {
    width: 100%;
    table-layout: fixed;
    font-size: 0.95rem;
}

    /* Table cells */
    #memberListTable th,
    #memberListTable td {
        padding: 0.6rem;
        vertical-align: middle;
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

        /* Column widths */
        #memberListTable th:first-child,
        #memberListTable td:first-child {
            width: 90px;
        }

        #memberListTable th:nth-child(2),
        #memberListTable td:nth-child(2) {
            width: 35%;
        }

        #memberListTable th:nth-child(3),
        #memberListTable td:nth-child(3) {
            width: 35%;
        }

        #memberListTable th:nth-child(4),
        #memberListTable td:nth-child(4) {
            width: 30%;
        }

    /* Sticky header */
    #memberListTable thead th {
        position: sticky;
        top: 0;
        z-index: 100;
        background: #0d6efd !important;
        color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
    }

    /* Active members */
    #memberListTable tbody tr.active-row td {
        color: #212529 !important;
        font-weight: 500;
    }

    /* Expired members */
    #memberListTable tbody tr.expired-row {
        animation: blinkRow 1.2s infinite;
    }

        #memberListTable tbody tr.expired-row td,
        #memberListTable tbody tr.expired-row a,
        #memberListTable tbody tr.expired-row i {
            color: #dc3545 !important;
            font-weight: 700;
        }

        #memberListTable tbody tr.expired-row a {
            text-decoration: none;
        }

/* Mobile */
@media (max-width: 768px) {

    .table-responsive {
        max-height: 400px;
    }

    #memberListTable {
        font-size: 13px;
    }

        #memberListTable th,
        #memberListTable td {
            padding: 0.45rem;
        }

    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Warning text blink */
@keyframes blinkRed {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .2;
    }
}

/* Expired row blink */
@keyframes blinkRow {
    0%, 100% {
        opacity: 1;
        background: #fff;
    }

    50% {
        opacity: .45;
        background: #ffe5e5;
    }
}
