/*
 * 2026-04-19 — global empty-state styling.
 *
 * Yii2 GridView (BaseListView) renders <div class="empty">No results found.</div>
 * when the dataProvider has 0 rows. Out of the box it's small grey text
 * floating outside the table — visually invisible. This file styles it to
 * match the canonical .closo-empty-state seller-side block.
 *
 * Loaded by:
 *   - assets/AppAsset.php (admin layout)
 *   - assets/AppAssetSeller.php (seller layout — applies to GridViews
 *     embedded in seller views)
 *
 * Also augments the existing .closo-empty-state with a hint slot for
 * search-aware messages and a clear-filter affordance.
 */

/* ── Yii2 GridView default empty state ──────────────────────────────── */

.empty {
    min-height: 240px;
    padding: 56px 24px;
    text-align: center;
    color: #1A202C;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.empty::before {
    content: '';
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(69, 43, 144, 0.06)
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23452b90' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>")
        center / 28px no-repeat;
}

.empty + .summary,
.summary + .empty { display: none; }

/* When a GridView has filterModel applied + 0 results, JS appends
   `data-filter-active="1"` to the wrapping table so we can inject a
   search-aware hint. */
[data-filter-active="1"] .empty::after {
    content: 'Try clearing your filters to see all rows.';
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #64748b;
    margin-top: 4px;
    max-width: 340px;
    line-height: 1.5;
}

/* ── Existing .closo-empty-state augmentation ───────────────────────── */

.closo-empty-state[data-search-active="1"] .closo-empty-state-cold,
.closo-empty-state:not([data-search-active="1"]) .closo-empty-state-search {
    display: none;
}

.closo-empty-state-clear-filter {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #452b90;
    background: rgba(69, 43, 144, 0.06);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}
.closo-empty-state-clear-filter:hover {
    background: rgba(69, 43, 144, 0.12);
    color: #452b90;
    text-decoration: none;
}
