﻿/* =====================================================
   TABLER × MUDBLAZOR — TABLE THEME
   Effects only | NO color overrides
   ===================================================== */


/* =====================================================
   #region TABLE ROOT
   ===================================================== */

.mud-table {
    background-color: transparent;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

    /* #endregion */


    /* =====================================================
   #region TABLE HEADER (TABLER STYLE)
   ===================================================== */

    .mud-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        background-color: transparent;
        color: var(--mud-palette-text-secondary);
        font-size: 0.7rem;
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        padding: 12px 16px;
        border-bottom: 1px solid var(--mud-palette-divider);
    }

    /* #endregion */


    /* =====================================================
   #region TABLE BODY CELLS
   ===================================================== */

    .mud-table tbody td {
        padding: 12px 16px;
        border-bottom: 1px solid var(--mud-palette-divider);
        color: var(--mud-palette-text-primary);
    }

/* Dense tables */
.mud-table-dense tbody td {
    padding: 8px 12px;
}

/* #endregion */


/* =====================================================
   #region ROW HOVER & MICRO-ANIMATION
   ===================================================== */

.mud-table tbody tr {
    transition: background-color 120ms ease, transform 120ms ease;
}

    /* Tabler subtle hover */
    .mud-table tbody tr:hover {
        background-color: color-mix( in srgb, var(--mud-palette-surface) 96%, transparent );
        transform: translateX(1px);
    }

/* #endregion */


/* =====================================================
   #region STRIPED TABLES (TABLER STYLE)
   ===================================================== */

.mud-table-striped tbody tr:nth-child(even) {
    background-color: color-mix( in srgb, var(--mud-palette-surface) 98%, transparent );
}

/* #endregion */


/* =====================================================
   #region SELECTED ROW
   ===================================================== */

.mud-table tbody tr.mud-table-row-selected {
    background-color: color-mix( in srgb, var(--mud-palette-primary) 12%, var(--mud-palette-surface) );
}

/* #endregion */


/* =====================================================
   #region SORT ICONS & HEADER INTERACTION
   ===================================================== */

.mud-table thead th .mud-table-sort-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.mud-table thead th:hover {
    color: var(--mud-palette-text-primary);
}

/* #endregion */


/* =====================================================
   #region PAGINATION (TABLER-LIKE)
   ===================================================== */

.mud-table-pagination {
    border-top: 1px solid var(--mud-palette-divider);
    padding-top: 8px;
}

    .mud-table-pagination .mud-button {
        border-radius: var(--mud-palette-border-radius);
    }

/* #endregion */


/* =====================================================
   #region LOADING STATE / SKELETON
   ===================================================== */

.mud-table-loading {
    position: relative;
    overflow: hidden;
}

    /* Skeleton shimmer rows */
    .mud-table-loading::after {
        content: "";
        position: absolute;
        inset: 0;
        transform: translateX(-100%);
        background: linear-gradient( 90deg, transparent, rgba(255,255,255,0.06), transparent );
        animation: table-shimmer 1.2s infinite;
    }

@keyframes table-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mud-table-loading::after {
        animation: none;
    }
}

/* #endregion */


/* =====================================================
   #region EMPTY STATE
   ===================================================== */

.mud-table-empty-row td {
    text-align: center;
    padding: 24px;
    color: var(--mud-palette-text-secondary);
}

/* #endregion */
/* FOOTER */
.sidebar-footer {
    padding: 12px 0;
    opacity: 0.65;
    font-size: 0.75rem;
}
