﻿/* Expand panel padding + header colors */
.mud-expand-panel .mud-expand-panel-header {
    padding: 0px 24px !important;
}

.mud-expand-panel-header {
    background-color: lightgray;
    color: black;
    border-radius: 5px;
    margin: 2px;
}

.gfd-entity .mud-expand-panel-header .mud-typography,
.irrigationarea-entity .mud-expand-panel-header .mud-typography,
.pivot-entity .mud-expand-panel-header .mud-typography,
.monitoringsite-entity .mud-expand-panel-header .mud-typography,
.watersource-entity .mud-expand-panel-header .mud-typography,
.amendmentsstockpile-entity .mud-expand-panel-header .mud-typography {
    color: #fff !important;
}

.mud-expand-panel .mud-expand-panel-content.mud-expand-panel-gutters {
    padding-left: 0px !important;
    padding-right: 0px !important;
}

/* PanelType chip */
.mud-chip.panel-function {
    --panel-function-width: 170px;
    width: var(--panel-function-width);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.1;
    border-radius: 16px;
    box-sizing: border-box;
    padding-left: 12px;
    padding-right: 12px;
    height: 30px !important;
}

.panel-function.mud-chip-filled {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: rgba(0, 0, 0, 0.12);
}

.panel-function .mud-chip-content {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    padding-top: 2px;
    padding-bottom: 2px;
}

.panel-function .panel-function-text,
.panel-function .mud-typography {
    display: inline-block;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: inherit;
    font-weight: inherit;
}

.panel-function {
    flex: 0 0 var(--panel-function-width);
}

.panel-entity-undefined .mud-expand-panel-header {
    background: var(--color_undefined) !important;
    border: 1px solid var(--color_undefined_light);
}

    .panel-entity-undefined .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-undefined .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_undefined) !important;
}

.panel-entity-amendments .mud-expand-panel-header {
    background: var(--color_amendments) !important;
    border: 1px solid var(--color_amendments_light);
}

    .panel-entity-amendments .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-amendments .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_amendments) !important;
}

.panel-entity-system .mud-expand-panel-header {
    background: var(--color_system) !important;
    border: 1px solid var(--color_system_light);
}

    .panel-entity-system .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-system .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_system) !important;
}

.panel-entity-user .mud-expand-panel-header {
    background: var(--color_user) !important;
    border: 1px solid var(--color_user_light) !important;
}

    .panel-entity-user .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-user .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_user) !important;
}

.panel-entity-sulphur .mud-expand-panel-header {
    background: var(--color_sulphur) !important;
    border: 1px solid var(--color_sulphur_light) !important;
}

    .panel-entity-sulphur .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-sulphur .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_sulphur) !important;
}

.panel-entity-gypsum .mud-expand-panel-header {
    background: var(--color_gypsum) !important;
    border: 1px solid var(--color_gypsum_light) !important;
}

    .panel-entity-gypsum .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-gypsum .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_gypsum) !important;
}

.panel-entity-irrigation .mud-expand-panel-header {
    background: var(--color_irrigation) !important;
    border: 1px solid var(--color_irrigation_light) !important;
}

    .panel-entity-irrigation .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-irrigation .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_irrigation) !important;
}

.panel-entity-watersource .mud-expand-panel-header {
    background: var(--color_watersource) !important;
    border: 1px solid var(--color_watersource_light) !important;
}

    .panel-entity-watersource .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-watersource .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_watersource) !important;
}

.panel-entity-soilsurface .mud-expand-panel-header {
    background: var(--color_soilsurface) !important;
    border: 1px solid var(--color_soilsurface_light) !important;
}

.panel-entity-soilprofile .mud-expand-panel-header {
    background: var(--color_soilprofile) !important;
    border: 1px solid var(--color_soilprofile_light) !important;
}


    .panel-entity-soilsurface .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-soilsurface .mud-expand-panel-header .mud-typography {
    color: #fff !important;
}

.panel-entity-soilsurface .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_soilsurface) !important;
}
.panel-entity-soilprofile .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_soilprofile) !important;
}

.panel-entity-gfd .mud-expand-panel-header {
    background: var(--color_gfd) !important;
    border: 1px solid var(--color_gfd_light) !important;
}

    .panel-entity-gfd .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-gfd .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_gfd) !important;
}

.panel-entity-irrigationarea .mud-expand-panel-header {
    background: var(--color_irrigationarea) !important;
    border: 1px solid var(--color_irrigationarea_light) !important;
}

    .panel-entity-irrigationarea .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-irrigationarea .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_irrigationarea) !important;
}

.panel-entity-zone .mud-expand-panel-header {
    background: var(--color_zone) !important;
    border: 1px solid var(--color_zone_light) !important;
}

    .panel-entity-zone .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-zone .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_zone) !important;
}

.panel-entity-stockpiles .mud-expand-panel-header {
    background: var(--color_stockpiles) !important;
    border: 1px solid var(--color_stockpiles_light) !important;
}

    .panel-entity-stockpiles .mud-expand-panel-header .mud-typography {
        color: #fff !important;
    }

.panel-entity-stockpiles .mud-typography.mud-typography-subtitle1.panel-function-text {
    color: var(--color_stockpiles) !important;
}

/* Make sure panel content lets the inner table manage scrolling */
.mud-expand-panel-content {
    overflow: visible; /* don’t hide wide tables */
    width: 100%; /* let the table wrapper stretch to panel width */
}

/* Keep the gutters version just for padding tweaks */
.mud-expand-panel .mud-expand-panel-content.mud-expand-panel-gutters {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Simple overlay container for body content */
.sep-overlay {
    display: grid;
    position: relative;
    /* no width constraint here so header layout is unaffected */
}

/* Body/content area that actually contains the table */
.sep-content {
    grid-area: 1 / 1;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* allow this grid item to shrink so it doesn't force overflow */
    min-width: 0;
}

    /* Extra safety: allow the inner table wrapper to shrink inside sep-content */
    .sep-content .table-wrapper {
        max-width: 100%;
        min-width: 0;
    }

/* Collapsed header opacity — strong specificity */
.sep-host.sep-collapsed .mud-expansion-panel-header,
.sep-host.sep-collapsed .mud-expand-panel-header,
.sep-host.sep-collapsed .mud-expansion-panel > .mud-expansion-panel-header {
    opacity: var(--sep-head-opacity, .6) !important;
    transition: opacity 120ms ease;
}

.sep-host.sep-expanded .mud-expansion-panel-header,
.sep-host.sep-expanded .mud-expand-panel-header,
.sep-host.sep-expanded .mud-expansion-panel > .mud-expansion-panel-header {
    opacity: 1 !important;
}

/* Header layout */
.sep-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
}

.sep-header-left {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1 1 auto;
    min-width: 0;
}

.sep-header-middle {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.sep-header-right {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
}

.sep-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.panel-function {
    padding: .125rem .5rem;
}

.panel-function-text {
    line-height: 1.25rem;
}
