/*
 * Filament tweaks needed on BOTH panels (registered globally via
 * FilamentAsset in AppServiceProvider; published by filament:assets).
 */

/* Filament ships no CSS for a "between"-aligned modal footer (only
   start/center/end), so a Between footer falls back to grouped-left. Make it
   actually spread edge-to-edge: e.g. cancel far left, confirm far right. */
.fi-modal-footer.fi-align-between .fi-modal-footer-actions {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

/* Admin customer page: the clickable summary tiles above the info card
   (resources/views/filament/admin/customers/summary-tiles.blade.php). Plain
   CSS on Filament's colour variables, because the admin panel has no
   compiled theme for arbitrary Tailwind utilities. */
.chb-customer-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .chb-customer-tiles {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .chb-customer-tiles {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.chb-customer-tile {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    padding: 0.75rem 1rem;
    text-align: start;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.chb-customer-tile:hover {
    background: var(--gray-50);
}

.chb-customer-tile:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

.chb-customer-tile--warning {
    border-color: var(--warning-400);
}

.chb-customer-tile__label,
.chb-customer-tile__detail {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.chb-customer-tile__detail {
    font-size: 0.75rem;
}

.chb-customer-tile__count {
    color: var(--gray-950);
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 600;
}

.dark .chb-customer-tile {
    background: rgb(255 255 255 / 0.05);
    border-color: rgb(255 255 255 / 0.1);
}

.dark .chb-customer-tile:hover {
    background: rgb(255 255 255 / 0.1);
}

.dark .chb-customer-tile--warning {
    border-color: var(--warning-500);
}

.dark .chb-customer-tile__label,
.dark .chb-customer-tile__detail {
    color: var(--gray-400);
}

.dark .chb-customer-tile__count {
    color: #fff;
}
