/* public/Pages/Home.razor.rz.scp.css */
/* The map and its panel. Wide screens (960px, MudBlazor's md): the panel is a column on the left and the map
   fills the rest. Narrow ones: the map fills the screen and the panel is a sheet over its bottom (the whole
   screen for a report). The panels' contents are child components, hence ::deep. */

/* Until the map draws, the basemap's land color (as in the startup skeleton in css/app.css). */
.city-map[b-nzzttwj2wp] {
    position: fixed;
    inset: 0;
    background-color: #e2dfda;
}

.city-map.dark[b-nzzttwj2wp] {
    background-color: #2f2f2f;
}

/* MapLibre's buttons and attribution only come in light: on the theme's surface, with the black icons inverted
   (the hue turned back, so that the location button stays blue while active). */
.city-map.dark[b-nzzttwj2wp]  .maplibregl-ctrl-group,
.city-map.dark[b-nzzttwj2wp]  .maplibregl-ctrl-attrib {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
}

.city-map.dark[b-nzzttwj2wp]  .maplibregl-ctrl-group button + button {
    border-top-color: var(--mud-palette-lines-default);
}

.city-map.dark[b-nzzttwj2wp]  .maplibregl-ctrl-icon,
.city-map.dark[b-nzzttwj2wp]  .maplibregl-ctrl-attrib-button {
    filter: invert(1) hue-rotate(180deg);
}

.city-map.dark[b-nzzttwj2wp]  .maplibregl-ctrl-attrib a {
    color: var(--mud-palette-text-secondary);
}

.map-page[b-nzzttwj2wp]  .map-status {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, calc(100% - 32px));
    text-align: center;
    z-index: 5;
}

.map-panel[b-nzzttwj2wp] {
    position: fixed;
    z-index: 3;
    display: flex;
    flex-direction: column;
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}

.map-panel-body[b-nzzttwj2wp] {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

@media (max-width: 959.98px) {
    .map-panel[b-nzzttwj2wp] {
        left: 0;
        right: 0;
        bottom: 0;
        top: 50dvh;
        border-radius: 28px 28px 0 0;
        box-shadow: var(--mud-elevation-8);
        transition: top 0.2s ease-out;
    }

    .map-panel.expanded[b-nzzttwj2wp] {
        top: 140px;
    }

    /* The top of the map stays visible, to see (and move) the marker. */
    .map-panel-new[b-nzzttwj2wp] {
        top: 40dvh;
    }

    .map-panel-detail[b-nzzttwj2wp] {
        top: 0;
        border-radius: 0;
    }

    /* Over the map, outside the sheet (fixed works inside the fixed panel, which has no transform). */
    .map-toolbar[b-nzzttwj2wp] {
        position: fixed;
        top: 12px;
        left: 12px;
        right: 12px;
        z-index: 4;
    }

    /* MapLibre's zoom and location buttons go below the toolbar. */
    .map-page[b-nzzttwj2wp]  .maplibregl-ctrl-top-right {
        top: 112px;
    }

    .map-page[b-nzzttwj2wp]  .category-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .map-panel[b-nzzttwj2wp] {
        transition: none;
    }
}

/* Toolbar: the search box and the profile menu, white over the map as in the design */

.map-page[b-nzzttwj2wp]  .address-search {
    flex: 1;
}

.map-page[b-nzzttwj2wp]  .address-search .mud-input {
    background-color: var(--mud-palette-surface);
    border-radius: 14px;
}

.map-page[b-nzzttwj2wp]  .address-search .mud-input-outlined-border {
    border-radius: 14px;
}

.map-page[b-nzzttwj2wp]  .map-button .mud-icon-button {
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    width: 44px;
    height: 44px;
}

/* Realtime/ConnectionStatus: as the profile button, but not a button. */
.map-page[b-nzzttwj2wp]  .connection-lost {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 14px;
    width: 44px;
    height: 44px;
}

.map-page[b-nzzttwj2wp]  .category-chips {
    display: flex;
    gap: 6px;
    padding: 8px 0 4px;
}

.map-page[b-nzzttwj2wp]  .category-chips .mud-chip {
    margin: 0;
    height: 36px;
    flex: none;
}

/* Over the map, a chip not chosen needs an opaque background. */
.map-page[b-nzzttwj2wp]  .category-chips .mud-chip:not(.mud-chip-selected) {
    background-color: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
}

@media (max-width: 959.98px) {
    .map-page[b-nzzttwj2wp]  .address-search .mud-input,
    .map-page[b-nzzttwj2wp]  .map-button .mud-icon-button,
    .map-page[b-nzzttwj2wp]  .connection-lost,
    .map-page[b-nzzttwj2wp]  .category-chips .mud-chip {
        box-shadow: var(--mud-elevation-4);
    }
}

/* Panel parts */

.map-page[b-nzzttwj2wp]  .panel-header {
    padding: 4px 20px 8px;
}

.map-page[b-nzzttwj2wp]  .panel-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
}

.map-page[b-nzzttwj2wp]  .panel-header h1 {
    font-size: 1.625rem;
}

.map-page[b-nzzttwj2wp]  .panel-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 16px 16px;
}

.map-page[b-nzzttwj2wp]  .panel-actions {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.map-page[b-nzzttwj2wp]  .cta-button {
    min-height: 56px;
    border-radius: 18px;
    font-size: 1.0625rem;
}

/* Narrow screens only: opens the sheet. The whole header drags it (wwwroot/reports/sheet.js), so the
   browser must not scroll the page on a touch there. */
.map-page[b-nzzttwj2wp]  .sheet-handle {
    display: flex;
    justify-content: center;
}

.map-panel-list[b-nzzttwj2wp]  .panel-header {
    touch-action: none;
    cursor: grab;
}

.map-page[b-nzzttwj2wp]  .photo-add:focus-within {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.map-page[b-nzzttwj2wp]  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.map-page[b-nzzttwj2wp]  .form-card {
    border-radius: 20px;
}

.map-page[b-nzzttwj2wp]  .photo-strip {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Report rows */

.map-page[b-nzzttwj2wp]  .report-list .mud-list-item {
    border-radius: var(--mud-default-borderradius);
}

.map-page[b-nzzttwj2wp]  .report-row {
    display: flex;
    align-items: center;
    gap: 12px;
}


.map-page[b-nzzttwj2wp]  .report-row-text {
    flex: 1;
    min-width: 0;
}

.map-page[b-nzzttwj2wp]  .report-row-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-page[b-nzzttwj2wp]  .report-row-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex: none;
}


/* New report */

.map-page[b-nzzttwj2wp]  .duplicates {
    background-color: var(--mud-palette-primary-hover);
    border-color: var(--mud-palette-primary);
}

.map-page[b-nzzttwj2wp]  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px;
}

/* Tiles, as in the design: a toggle item per category, outlined until chosen. */
.map-page[b-nzzttwj2wp]  .category-grid .mud-toggle-item {
    min-height: 92px;
    border: 2px solid var(--mud-palette-lines-default);
    border-style: solid !important; /* MudBlazor turns it off */
    border-radius: var(--mud-default-borderradius);
    font-weight: 600;
}

.map-page[b-nzzttwj2wp]  .category-grid .mud-toggle-item:not(.mud-toggle-item-selected) {
    color: var(--mud-palette-text-primary);
}

.map-page[b-nzzttwj2wp]  .category-grid .mud-toggle-item.mud-toggle-item-selected {
    border-color: var(--mud-palette-primary);
}

.map-page[b-nzzttwj2wp]  .optional {
    font-family: var(--mud-typography-default-family);
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--mud-palette-text-secondary);
}

.map-page[b-nzzttwj2wp]  .photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-page[b-nzzttwj2wp]  .photo-thumb {
    position: relative;
    width: 104px;
    height: 104px;
}

.map-page[b-nzzttwj2wp]  .photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.map-page[b-nzzttwj2wp]  .photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
}

.map-page[b-nzzttwj2wp]  .photo-add {
    width: 104px;
    height: 104px;
    border-radius: 18px;
    border: 2px dashed var(--mud-palette-lines-inputs);
    background-color: var(--mud-palette-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

/* Report detail */

.map-page[b-nzzttwj2wp]  .panel-scroll.detail {
    padding: 0;
}

.map-page[b-nzzttwj2wp]  .detail-hero {
    position: relative;
    min-height: 76px;
}

.map-page[b-nzzttwj2wp]  .detail-hero.has-photos {
    height: 240px;
    background-color: var(--mud-palette-background-gray);
}

.map-page[b-nzzttwj2wp]  .detail-photos {
    height: 100%;
}

.map-page[b-nzzttwj2wp]  .detail-photos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* The skeleton covers the photo until it has loaded. */
.map-page[b-nzzttwj2wp]  .detail-photos .photo-skeleton {
    position: absolute;
    inset: 0;
}

.map-page[b-nzzttwj2wp]  .detail-photos img.photo-loading {
    visibility: hidden;
}

.map-page[b-nzzttwj2wp]  .detail-back {
    position: absolute;
    top: 16px;
    left: 16px;
    border-radius: 14px;
    box-shadow: var(--mud-elevation-4);
}

.map-page[b-nzzttwj2wp]  .detail-body {
    position: relative;
    padding: 20px 20px 16px;
    background-color: var(--mud-palette-surface);
}

/* As in the design, the body overlaps the photos with rounded corners. */
.map-page[b-nzzttwj2wp]  .has-photos + .detail-body {
    margin-top: -28px;
    border-radius: 28px 28px 0 0;
}

.map-page[b-nzzttwj2wp]  .detail-description {
    white-space: pre-line;
}

.map-page[b-nzzttwj2wp]  .timeline-comment {
    white-space: pre-line;
}

.map-page[b-nzzttwj2wp]  .timeline blockquote {
    margin: 0;
}

/* Last, so that it overrides the rules above. */
@media (min-width: 960px) {
    .city-map[b-nzzttwj2wp] {
        left: 420px;
    }

    .map-panel[b-nzzttwj2wp] {
        top: 0;
        bottom: 0;
        left: 0;
        width: 420px;
        border-right: 1px solid var(--mud-palette-lines-default);
    }

    .map-toolbar[b-nzzttwj2wp] {
        padding: 16px 16px 0;
    }

    .map-page[b-nzzttwj2wp]  .sheet-handle {
        display: none;
    }

    .map-panel-list[b-nzzttwj2wp]  .panel-header {
        touch-action: auto;
        cursor: auto;
    }

    .map-page[b-nzzttwj2wp]  .panel-header {
        padding-top: 16px;
    }

    .map-page[b-nzzttwj2wp]  .category-chips {
        flex-wrap: wrap;
    }
}
/* public/Pages/Settings.razor.rz.scp.css */
/* Grouped settings, as on a phone: a small heading over each card, one item per row. */
.settings[b-e84abwetkr]  .settings-heading {
    display: block;
    margin: 24px 4px 8px;
    color: var(--mud-palette-text-secondary);
    font-weight: 600;
}

.settings[b-e84abwetkr]  .settings-heading:first-of-type {
    margin-top: 8px;
}

.settings[b-e84abwetkr]  .settings-group {
    overflow: hidden;
}

.settings-item[b-e84abwetkr] {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.settings-row[b-e84abwetkr] {
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-row[b-e84abwetkr]  .mud-icon-root {
    flex: none;
    color: var(--mud-palette-action-default);
}

.settings-row[b-e84abwetkr]  .mud-icon-root.mud-success-text {
    color: var(--mud-palette-success);
}

.settings-item[b-e84abwetkr]  .mud-toggle-group {
    width: 100%;
}

.settings-item[b-e84abwetkr]  .mud-toggle-item {
    flex: 1;
}
