/* ──────────────────────────────────────────────────────────────────────────────
   DMU empty-state component (templates/components/empty-state/empty-state.php)

   Centered icon + title + text + optional CTA, with a faint grid pattern
   that fades at the edges. Used across customer pages where the table is
   empty and there's no active query/filter.
   ────────────────────────────────────────────────────────────────────────────── */

.dmu-empty-state {
    position: relative;
    padding: 4rem 1.5rem;
    text-align: center;
    isolation: isolate;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dmu-empty-state__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(0, 0, 0, 0.95), transparent 75%);
    mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(0, 0, 0, 0.95), transparent 75%);
}

.dmu-empty-state__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--separator) 1px, transparent 1px),
        linear-gradient(to bottom, var(--separator) 1px, transparent 1px);
    background-size: 56px 56px;
}

/* A few cells in the grid get tinted with --primary, scattered around the
   icon. Sized to match a single grid cell (54x54 leaves the grid lines
   visible around the edge). */
.dmu-empty-state__block {
    position: absolute;
    width: 54px;
    height: 54px;
    background: rgba(var(--primary-rgb), 0.12);
    border-radius: 2px;
    pointer-events: none;
}

.dmu-empty-state__block:nth-of-type(1) { top: 18%; left: 22%; opacity: 0.95; }
.dmu-empty-state__block:nth-of-type(2) { top: 28%; left: 70%; opacity: 0.65; }
.dmu-empty-state__block:nth-of-type(3) { top: 60%; left: 18%; opacity: 0.55; }
.dmu-empty-state__block:nth-of-type(4) { top: 72%; left: 60%; opacity: 0.85; }
.dmu-empty-state__block:nth-of-type(5) { top: 24%; left: 84%; opacity: 0.4;  }
.dmu-empty-state__block:nth-of-type(6) { top: 68%; left: 80%; opacity: 0.5;  }
.dmu-empty-state__block:nth-of-type(7) { top: 50%; left: 12%; opacity: 0.7;  }

.dmu-empty-state__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dmu-empty-state__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--foreground);
    border: 1px solid var(--separator-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.25rem;
}

.dmu-empty-state__icon svg {
    width: 22px;
    height: 22px;
}

.dmu-empty-state__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--body);
    margin: 0 0 0.4rem;
}

.dmu-empty-state__text {
    color: var(--alternate);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
    max-width: 380px;
}

.dmu-empty-state__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.dmu-empty-state__btn {
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: var(--border-radius-md);
}

.dmu-empty-state__btn.btn-outline-dark {
    background: var(--foreground);
}

.dmu-empty-state__btn svg {
    width: 16px;
    height: 16px;
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */

html[data-color^='dark-'] .dmu-empty-state__icon {
    border-color: var(--separator);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}

html[data-color^='dark-'] .dmu-empty-state__btn {
    background: var(--foreground);
    border-color: var(--separator);
    color: var(--body);
}

/* ── Mobile ────────────────────────────────────────────────────────────────── */

@media (max-width: 575.98px) {
    .dmu-empty-state {
        padding: 3rem 1rem;
        min-height: 300px;
    }
}
