/* ═══════════════════════════════════════
   KlikGrid – custom grid component
   ═══════════════════════════════════════ */

/* ─── Wrapper ─── */
.klik-grid-wrapper {
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    overflow: auto;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

/* ─── Table ─── */
.klik-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: .835rem;
    line-height: 1.4;
    table-layout: fixed;
}

/* ─── Header ─── */
.klik-grid thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f6f8fa;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .04em;
    padding: 8px 12px;
    border-bottom: 2px solid #e2e6ea;
    white-space: nowrap;
    user-select: none;
}

.klik-grid-sortable {
    cursor: pointer;
}

.klik-grid-sortable:hover {
    color: #1a73e8;
}

.klik-grid-sort-icon {
    font-size: .65rem;
    margin-left: 4px;
    vertical-align: middle;
}

/* ─── Body rows ─── */
.klik-grid tbody tr {
    transition: background-color .12s ease;
    cursor: default;
}

.klik-grid tbody tr:hover {
    background: #f0f4ff;
}

.klik-grid tbody td {
    padding: 6px 12px;
    border-bottom: 1px solid #eef0f3;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* alternate row stripe */
.klik-grid tbody tr:nth-child(even) {
    background: #fafbfc;
}

.klik-grid tbody tr:nth-child(even):hover {
    background: #f0f4ff;
}

/* ─── Selected row ─── */
.klik-grid-row-selected {
    background: #dbeafe !important;
}

.klik-grid-row-selected td {
    color: #1e40af;
}

/* ─── Checkbox column ─── */
.klik-grid-check-col {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    text-align: center;
    padding: 6px 4px !important;
}

.klik-grid-check-col input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* ─── Empty state ─── */
.klik-grid-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.klik-grid-empty-default {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #a0aec0;
}

.klik-grid-empty-default i {
    font-size: 2.4rem;
}

.klik-grid-empty-default span {
    font-size: .9rem;
}
