/* Grid.js Custom Styling für TailwindCSS und REWE Design */

/* Override Grid.js styles to match TailwindCSS and REWE design */
.gridjs-wrapper {
    font-family: inherit;
    border: none;
    box-shadow: none;
    background: transparent;
}

.gridjs-container {
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.gridjs {
    border: none;
}

/* Header Styling */
.gridjs-head {
    background-color: #f9fafb;
    border: none;
}

.gridjs-thead {
    background-color: #f9fafb;
    border: none;
}

.gridjs-th {
    background-color: #f9fafb !important;
    color: #374151;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    border-top: none;
    border-left: none;
    border-right: none;
}

.gridjs-th:first-child {
    border-left: none;
}

.gridjs-th:last-child {
    border-right: none;
}

.gridjs-th-sort {
    cursor: pointer;
}

.gridjs-th-sort:hover {
    background-color: #f3f4f6 !important;
}

/* Table Body */
.gridjs-tbody {
    background-color: white;
    border: none;
}

.gridjs-tr {
    border-bottom: 1px solid #e5e7eb;
    border-left: none;
    border-right: none;
    border-top: none;
    transition: background-color 0.15s ease-in-out;
}

.gridjs-tr:hover {
    background-color: #f9fafb;
}

.gridjs-tr:last-child {
    border-bottom: none;
}

.gridjs-td {
    padding: 1rem 1.5rem;
    color: #111827;
    font-size: 0.875rem;
    border: none;
    white-space: nowrap;
}

.gridjs-td:first-child {
    border-left: none;
}

.gridjs-td:last-child {
    border-right: none;
}

/* Search Box */
.gridjs-search {
    margin-bottom: 1rem;
}

.gridjs-search-input {
    width: 100%;
    max-width: 20rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.gridjs-search-input:focus {
    outline: none;
    border-color: #E30613;
    box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.1);
}

/* Pagination */
.gridjs-pagination {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.gridjs-pages {
    display: flex;
    gap: 0.25rem;
}

.gridjs-pages button {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.gridjs-pages button:hover:not(:disabled) {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.gridjs-pages button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gridjs-pages button[aria-current="page"] {
    background-color: #E30613;
    color: white;
    border-color: #E30613;
}

/* Summary */
.gridjs-summary {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Loading */
.gridjs-loading {
    background-color: rgba(249, 250, 251, 0.9);
}

.gridjs-loading-bar {
    background-color: #E30613;
}

/* Sort Icons */
.gridjs-th-sort::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
}

.gridjs-th-sort[aria-sort="asc"]::after {
    border-bottom: 4px solid #374151;
}

.gridjs-th-sort[aria-sort="desc"]::after {
    border-top: 4px solid #374151;
}

.gridjs-th-sort:not([aria-sort])::after {
    border-bottom: 4px solid #d1d5db;
}

/* Responsive */
@media (max-width: 768px) {
    .gridjs-th,
    .gridjs-td {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .gridjs-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .gridjs-pages {
        justify-content: center;
    }
}

/* Text Alignment Utilities */
.gridjs-td.text-right {
    text-align: right;
}

.gridjs-td.text-center {
    text-align: center;
}

.gridjs-td.text-left {
    text-align: left;
}

/* Custom REWE Colors */
.gridjs-th-sort[aria-sort]::after {
    border-color: #E30613;
}

/* Empty State */
.gridjs-notfound {
    padding: 2rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Footer */
.gridjs-footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
}

