/* =========================================================
   app.css - Ajustes responsive globales (mobile-first)
   CleanArchitectureNet8.Client
   ========================================================= */

/* ---------- Layout: el MudMainContent debe correr el alto del MudAppBar (56px) ---------- */
.mud-main-content {
    padding-top: 56px !important;
}

/* ---------- Toolbar responsive en páginas ---------- */
.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.page-toolbar .page-toolbar-search {
    flex: 1 1 220px;
    min-width: 180px;
}

.page-toolbar .page-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 600px) {
    .page-toolbar .mud-spacer {
        display: none;
    }

    .page-toolbar .page-toolbar-search {
        flex-basis: 100%;
    }
}

/* ---------- Tablas / celdas: tipografía un poco menor en mobile ---------- */
@media (max-width: 600px) {
    .mud-table-cell .mud-typography {
        font-size: 0.85rem;
    }

    .product-list-grid .mud-table-container thead th {
        font-size: 0.75rem;
    }
}

/* ---------- Logo del AppBar (tamaño fijo para que no cambie entre breakpoints) ---------- */
.app-bar-logo {
    width: 80px;
    height: 36px;
}

/* ---------- Thumbnails del listado de productos ---------- */
.product-thumb {
    width: 72px;
    height: 72px;
}

@media (max-width: 600px) {
    .product-thumb {
        width: 48px;
        height: 48px;
    }
}

/* ---------- Galería de imágenes (dialog) ---------- */
.product-gallery-dialog {
    width: 95vw;
    max-width: 95vw;
}

@media (min-width: 600px) {
    .product-gallery-dialog {
        width: 75vw;
        max-width: 900px;
    }
}

@media (max-width: 600px) {
    /* Flechas de galería más grandes para tap targets */
    .product-gallery-dialog .mud-icon-button {
        padding: 8px;
    }
}

/* ---------- Card actions: botones full-width en mobile ---------- */
.page-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
}

.page-actions .mud-button {
    width: 100%;
}

@media (min-width: 600px) {
    .page-actions {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }

    .page-actions .mud-button {
        width: auto;
    }
}

/* ---------- DataGrid responsive helpers ---------- */
@media (max-width: 600px) {
    .mud-table-pager .mud-table-pager-toolbar {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* ---------- Filter chips: no se desbordan en mobile ---------- */
@media (max-width: 600px) {
    .mud-chip {
        font-size: 0.7rem;
    }
}
