.glix-table {
    margin: 1em 0;
    font-size: 14px;
}

.glix-cell-image {
    max-width: 80px;
    max-height: 80px;
    display: block;
    border-radius: 4px;
    object-fit: cover;
}

.glix-cell-lightbox {
    display: inline-block;
    cursor: zoom-in;
}

.glix-cell-button {
    display: inline-block;
    padding: 4px 12px;
    background: #2271b1;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
}

.glix-cell-button:hover {
    background: #135e96;
    color: #fff;
}

.glix-cell-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.8em;
    font-weight: 600;
}

.glix-cell-rating {
    color: #e2a03f;
    letter-spacing: 1px;
}

.glix-table__lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    cursor: zoom-out;
}

.glix-table__lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
}

.glix-table__toolbar {
    margin-bottom: 0.5em;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.glix-table__edit-form {
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 1em;
    background: #fafafa;
}

.glix-table__edit-form h4 {
    margin-top: 0;
}

.glix-table__field {
    display: block;
    margin-bottom: 8px;
}

.glix-table__field span {
    display: block;
    font-size: 0.8em;
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
}

.glix-table__field input[type="text"],
.glix-table__field textarea {
    width: 100%;
    max-width: 400px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.glix-table__row-edit,
.glix-table__row-delete {
    font-size: 0.85em;
    padding: 2px 8px;
    margin-right: 4px;
}

.glix-table__search {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 200px;
}

.glix-table__scroll {
    overflow-x: auto;
}

.glix-table__table {
    width: 100%;
    border-collapse: collapse;
}

.glix-table__table th,
.glix-table__table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e2e2;
    text-align: left;
}

.glix-table__table thead th {
    position: sticky;
    top: 0;
    background: #f7f7f7;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.glix-table__sortable::after {
    content: '\21C5';
    opacity: 0.35;
    margin-left: 4px;
    font-size: 0.85em;
}

.glix-table__sort-asc::after {
    content: '\2191';
    opacity: 1;
}

.glix-table__sort-desc::after {
    content: '\2193';
    opacity: 1;
}

.glix-table__pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 0.75em;
}

.glix-table__pagination button {
    padding: 4px 10px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.glix-table__pagination button:disabled {
    opacity: 0.4;
    cursor: default;
}

.glix-table--loading .glix-table__scroll {
    opacity: 0.5;
}

.glix-table__empty,
.glix-table__error {
    text-align: center;
    padding: 1em;
    color: #666;
}

.glix-table__error {
    color: #b32d2e;
}

@media (max-width: 600px) {
    .glix-table__table thead {
        display: none;
    }

    .glix-table__table,
    .glix-table__table tbody,
    .glix-table__table tr,
    .glix-table__table td {
        display: block;
        width: 100%;
    }

    .glix-table__table tr {
        margin-bottom: 0.75em;
        border: 1px solid #e2e2e2;
        border-radius: 6px;
        overflow: hidden;
    }

    .glix-table__table td {
        border-bottom: 1px solid #eee;
    }

    .glix-table__table td::before {
        content: attr(data-label);
        display: block;
        font-weight: 600;
        font-size: 0.75em;
        text-transform: uppercase;
        color: #888;
        margin-bottom: 2px;
    }
}
