/*
This css code fixes css framework conflicts between MUI and Joomla (Bootstrap/Cassiopeia).
 */

/* MUI DataGrid cells get a top margin from Bootstrap's `p { margin-bottom: 1rem }` — reset it */
#nextrestaurant-root .MuiDataGrid-mainContent p {
    margin: 0;
}

/* In admin, the component renders its own toolbar — hide Joomla's subhead */
body.com_nextrestaurant #subhead-container {
    display: none;
}

/* Cassiopeia ships `[role="tooltip"]:not(.show) { display: none; ... }` (Bootstrap convention).
   MUI never adds Bootstrap's `.show` class to its poppers, so that rule would hide every MUI
   tooltip and overwrite its styling. We restore MUI's behaviour for popper portals only —
   the inner `.MuiTooltip-tooltip` keeps the dark pill from MUI's own emotion styles. */
.MuiPopper-root[role="tooltip"] {
    display: block !important;
    z-index: 1500 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: inherit !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    right: auto !important;
    max-width: none !important;
    text-align: inherit !important;
}
