/* /admin/map/locations — dfl shell + edit form + drawer styling.
   Loaded globally by Dash's /assets convention; the rules here are
   namespaced under ``.loc-admin-*`` so they only affect this page. */


/* ---------------------------------------------------------------
   Inventory rows — clickable affordance
   --------------------------------------------------------------- */

.mantine-Table-tr[id*="loc-admin-row"] {
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

.mantine-Table-tr[id*="loc-admin-row"]:hover {
    background-color: var(--mantine-color-default-hover) !important;
    box-shadow: inset 3px 0 0 var(--mantine-color-harbor-6);
}


/* ---------------------------------------------------------------
   Edit panel — flex column inside its host (dfl tab OR drawer)
   --------------------------------------------------------------- */

.loc-admin-edit-host,
.loc-admin-edit-host > .loc-admin-edit-panel {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.loc-admin-edit-eyebrow {
    flex: 0 0 auto;
    background-color: var(--mantine-color-default-hover);
}

.loc-admin-edit-savebar {
    flex: 0 0 auto;
    /* The sticky bottom keeps Save above the iOS safe-area on
       mobile. The bar's parent is the form-inner stack; the
       enclosing drawer body handles the safe-area bottom inset. */
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Empty state fills the scroll body when no row is selected. */
.loc-admin-edit-empty {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ---------------------------------------------------------------
   Mobile drawer body — match the public-map detail drawer's
   liquid-glass treatment for visual consistency.
   --------------------------------------------------------------- */

.loc-admin-edit-drawer-body {
    padding: 0 !important;
    height: 100%;
    overflow: hidden !important;
    background: var(--mantine-color-body);
}

.loc-admin-edit-drawer-content {
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}


/* ---------------------------------------------------------------
   Per-day hours editor — keep the rows tight on mobile.
   --------------------------------------------------------------- */

.loc-admin-edit-hours-host {
    width: 100%;
    overflow-x: auto;
}

@media (max-width: 540px) {
    .loc-admin-edit-hours-host .mantine-Group-root {
        flex-wrap: wrap !important;
    }
}


/* ---------------------------------------------------------------
   Preview host — inherits the create-panel review card chrome via
   the wizard's CSS already loaded by /map; no extra rules needed
   here beyond a comfortable padding.
   --------------------------------------------------------------- */

.loc-admin-preview-host {
    background: var(--mantine-color-body);
}


/* ---------------------------------------------------------------
   FlexLayout shell — flatten the default theme so the dfl chrome
   blends with the admin surface header.
   --------------------------------------------------------------- */

#loc-admin-flex .flexlayout__layout,
#loc-admin-flex .flexlayout__tabset {
    background: var(--mantine-color-body);
}

#loc-admin-flex .flexlayout__tab {
    background: var(--mantine-color-body);
    color: var(--mantine-color-text);
}

#loc-admin-flex .flexlayout__tab_button--selected {
    background: var(--mantine-color-default-hover);
}
