/*
 * GX TABLE — Dark Luxury Data Grid
 * Flamingo Pink accents, subtle glow, smooth hover interactions
 */

/* WRAPPER (scroll-safe on mobile) */
.gx-table-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

/* TABLE */
.gx-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-soft);
    border-radius: var(--radius-soft);
    box-shadow: var(--shadow-elevated);
    overflow: hidden;
}

/* HEADER */
.gx-table thead th {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    text-align: left;

    font-weight: 600;
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;

    border-bottom: 1px solid var(--color-border-soft);
    position: sticky;
    top: 0;

    backdrop-filter: blur(10px);
    z-index: 2;
}

/* HEADER SORTABLE STATE */
.gx-table th.sortable {
    cursor: pointer;
    transition: color var(--transition-fast), text-shadow var(--transition-fast);
}

.gx-table th.sortable:hover {
    color: var(--color-brand);
    text-shadow: 0 0 8px var(--color-brand-glow);
}

/* BODY ROWS */
.gx-table tbody tr {
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.gx-table tbody tr:hover {
    background: rgba(255, 79, 163, 0.05);
    box-shadow: inset 0 0 18px rgba(255, 79, 163, 0.08);
}

/* CELLS */
.gx-table td {
    padding: 0.75rem 1.1rem;
    border-bottom: 1px solid rgba(255, 79, 163, 0.08);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* FINAL ROW BORDER REMOVAL */
.gx-table tbody tr:last-child td {
    border-bottom: none;
}

/* CLICKABLE ROW */
.gx-table-row-link {
    cursor: pointer;
}

.gx-table-row-link:hover td {
    color: var(--color-text-primary);
}

/* MOBILE (stack columns) — optional but recommended */
@media (max-width: 750px) {
    .gx-table thead {
        display: none;
    }

    .gx-table,
    .gx-table tbody,
    .gx-table tr,
    .gx-table td {
        display: block;
        width: 100%;
    }

    .gx-table tr {
        margin-bottom: 1rem;
        background: var(--color-bg-card);
        border-radius: var(--radius);
        box-shadow: var(--shadow-elevated);
        padding: 0.8rem;
    }

    .gx-table td {
        border-bottom: none;
        padding: 0.5rem 0;
        color: var(--color-text-primary);
        font-size: 1rem;
        position: relative;
    }

    .gx-table td::before {
        content: attr(data-label);
        font-size: 0.75rem;
        color: var(--color-text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        display: block;
    }
}
