﻿/* ================= PAGE ================= */
body {
    background: var(--bg);
    color: var(--ink);
}

/* ================= TOOLBAR ================= */
.toolbar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.rz-button {
    background: var(--card) !important;
    border: 1px solid var(--line) !important;
    color: var(--ink) !important;
    border-radius: 8px;
}

    .rz-button:hover {
        background: #eef2f7 !important;
    }

/* ================= SEARCH ================= */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

/* ================= TABLE CONTAINER ================= */
/* Wrapper around the grid */
.table-scroll-container {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    max-height: 70vh;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
}

    /* Make Radzen grid use full width */
    .table-scroll-container .rz-data-grid {
        min-width: 1200px; /* increase if you have many columns */
        width: max-content;
    }

        /* Keep header visible while scrolling vertically */
        .table-scroll-container .rz-data-grid .rz-datatable-scrollable-header,
        .table-scroll-container .rz-data-grid .rz-data-grid-header {
            position: sticky;
            top: 0;
            z-index: 0;
            background: #fff;
        }

    /* Prevent cell text from breaking layout too aggressively */
    .table-scroll-container .rz-cell-data,
    .table-scroll-container .rz-column-title-content {
        white-space: nowrap;
    }

        /* Optional: allow long content cells to wrap only where needed */
        .table-scroll-container .rz-cell-data.wrap {
            white-space: normal;
            word-break: break-word;
        }
/* ================= RADZEN GRID ================= */

/* HEADER */
.rz-datatable-thead th {
    background: #eef2f7;
    font-weight: 600;
    font-size: 13px;
    color: var(--feature-ink);
    border-bottom: 1px solid var(--line);
    padding: 6px 8px !important;
}

/* DATA CELLS */
.rz-datatable-tbody td {
    padding: 6px 8px !important;
    font-size: 13px;
    border-bottom: 1px solid var(--line);
}

/* FILTER ROW */
.rz-filter-row td {
    padding: 4px 6px !important;
    background: #f8fafc;
}

/* INPUTS */
.rz-dropdown,
.rz-textbox,
.rz-numeric {
    height: 40px !important;
    min-height: 40px !important;
    font-size: 13px;
}

/* ================= ZEBRA STRIPING ================= */
.rz-datatable-tbody tr:nth-child(even) {
    background: #f9fbfd;
    height: 20px !important;
}

.rz-datatable-tbody tr:nth-child(odd) {
    background: #ffffff;
}

/* HOVER EFFECT */
.rz-datatable-tbody tr:hover {
    background: #eef2f7 !important;
}

/* Hide filter row (ALL possible Radzen variants) */
.hide-filters .rz-filter-row,
.hide-filters .rz-datatable-filter-row,
.hide-filters .rz-datatable-thead .rz-filter-row,
.hide-filters .rz-datatable-thead tr.rz-filter-row {
    display: none !important;
}

/* Show filter row */
.show-filters .rz-filter-row,
.show-filters .rz-datatable-filter-row {
    display: table-row !important;
}

/* ================= HEADER ICON ================= */
.header-with-icon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

    .header-with-icon i {
        font-size: 13px;
        color: #9aa4b2;
    }

    .header-with-icon:hover i {
        color: #6b7280;
    }

/* ================= ACTIONS ================= */
.actions-cell {
    display: flex;
    gap: 6px;
    justify-content: center;
}

/* ICON BUTTONS (GRAYSCALE STYLE) */
.icon-btn {
    border: 0px solid #d1d5db;
    background: none;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 13px;
    color: #4b5563; /* neutral gray */
    transition: all 0.2s ease;
}

    /* HOVER */
    .icon-btn:hover {
        background: linear-gradient(145deg, #e5e7eb, #d1d5db);
        color: #111827;
    }

    /* ACTIVE CLICK */
    .icon-btn:active {
        transform: scale(0.95);
    }

/* REMOVE EMOJI COLOR FEEL */
.icon-btn {
    filter: grayscale(100%);
}

/* ================= PAGINATION ================= */
.pagination-controls {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ================= MODAL ================= */
.modal-form .form-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.modal-form label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
    display: block;
}

.modal-form .rz-dropdown,
.modal-form .rz-textbox,
.modal-form .rz-numeric {
    width: 100% !important;
}

.modal-form .checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-actions .btn {
    border-radius: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f4f6f9;
    padding: 6px 10px;
    border-radius: 12px;
    width: 80%;
}

/* Icon */
.search-icon {
    font-size: 14px;
    opacity: 0.7;
}

/* Input */
.search-input {
    width: 160px !important;
    font-size: 12px !important;
}

/* Stats container */
.search-stats {
    display: flex;
    gap: 15px;
    margin-left: 10px;
}

    /* Stats text */
    .search-stats span {
        font-size: 12px;
        color: #555;
    }

    /* Numbers emphasis */
    .search-stats b {
        color: #222;
        font-weight: 600;
    }
