/* IES Reports — Frontend shortcode table styles */

.ies-report-wrap {
    margin: 20px 0;
    font-size: 14px;
}

.ies-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.ies-report-title {
    margin: 0;
    font-size: 1.2em;
}

/* Search bar */
.ies-report-search-form { margin-bottom: 12px; }
.ies-search-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ies-search-input {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 200px;
    font-size: 14px;
}
.ies-search-btn {
    padding: 6px 14px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.ies-search-btn:hover { background: #135e96; }
.ies-search-clear { color: #888; font-size: 13px; text-decoration: underline; }

/* Meta row */
.ies-report-meta { color: #666; font-size: 13px; margin-bottom: 8px; }

/* Table */
.ies-report-table-wrap { overflow-x: auto; }

.ies-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ies-report-table th,
.ies-report-table td {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}

.ies-report-table thead th {
    background: #f4f4f4;
    font-weight: 600;
    white-space: nowrap;
}

.ies-report-table tbody tr:nth-child(even) { background: #fafafa; }
.ies-report-table tbody tr:hover { background: #f0f5ff; }

/* Sortable headers */
.ies-sort-link { text-decoration: none; color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.ies-sort-link:hover { color: #2271b1; }
.ies-sort-icon { font-size: 12px; }
.ies-sort-inactive { color: #ccc; }
th.ies-sorted { background: #e8f0fe; }

/* Pagination */
.ies-report-pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ies-report-pagination a {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    color: #2271b1;
    font-size: 13px;
    background: #fff;
}

.ies-report-pagination a:hover { background: #f0f5ff; border-color: #2271b1; }
.ies-page-current {
    padding: 5px 10px;
    border: 1px solid #2271b1;
    border-radius: 3px;
    background: #2271b1;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* States */
.ies-report-no-results,
.ies-report-error {
    padding: 14px;
    background: #f8f9fa;
    border-left: 4px solid #ccd0d4;
    color: #666;
    margin: 10px 0;
}

/* Report filters (registered reports with url_filters) */
.ies-report-filter-form { margin-bottom: 14px; }
.ies-filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.ies-filter-field { display: flex; flex-direction: column; gap: 4px; }
.ies-filter-label { font-size: 12px; font-weight: 600; color: #555; }
.ies-filter-actions { display: flex; gap: 8px; align-items: center; }

/* Responsive */
@media (max-width: 600px) {
    .ies-report-table th,
    .ies-report-table td { padding: 6px 8px; font-size: 12px; }
    .ies-search-input { min-width: 140px; }
}
