﻿/* Radzen applies transform: translateZ(0) to .rz-body for GPU compositing, but any
   CSS transform on an ancestor breaks position:fixed (it becomes relative to that
   ancestor instead of the viewport). Override it so fixed overlays (lightboxes, modals)
   anchor correctly to the full viewport. */
.rz-layout .rz-body {
    transform: none !important;
}

/* Radzen defaults --rz-layout-body-padding to 1rem, which creates an unwanted white
   border around full-bleed pages (e.g. the map) and unnecessarily narrows all grids.
   Set it to 0 globally and let each page manage its own padding via .page-container.
   Also zero padding on the rz-body element itself — the CSS variable alone is
   insufficient when Radzen's compiled styles set explicit padding on .rz-body. */
:root {
    --rz-layout-body-padding: 0;
}

.rz-layout .rz-body,
.rz-layout .rz-body > article.content {
    padding: 0 !important;
    margin: 0;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    height: 100vh; /* Fallback */
    height: 100dvh; /* Dynamic Viewport Height: responds to toolbars */
    margin: 0;
    overflow: hidden; /* Recommended for Blazor apps to prevent double-scrollbars */
}

::selection,
input::selection,
textarea::selection,
select::selection {
    background-color: #1976d2 !important;
    color: #ffffff !important;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 0;
}

.page-container {
    padding: 20px;
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJm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5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* OpenLayers LayerSwitcher: force text/icons to black to override plugin defaults */
.ol-layerswitcher,
.ol-layerswitcher ul,
.ol-layerswitcher li,
.ol-layerswitcher label,
.ol-layerswitcher .layer,
.ol-layerswitcher a,
.layer-switcher,
.layer-switcher label,
.layer-switcher .layer,
.layer-switcher a {
    color: #000 !important;
    background-color: transparent !important;
}

/* Position the layer-switcher close to the top-right so it doesn't
   overlap the legend panel which anchors to the bottom-right. */
.layer-switcher {
    top: 0.5em !important;
}

    /* Ensure checkboxes/inputs inside switcher are visible on light/dark backgrounds */
    .ol-layerswitcher input,
    .layer-switcher input {
        color: #000 !important;
    }

    /* Ensure SVG icons inside the control are also black */
    .ol-layerswitcher svg,
    .ol-layerswitcher svg * {
        fill: #000 !important;
        stroke: #000 !important;
    }

/* Slight specificity fallback if plugin uses different container classes */
div[class*="layerSwitcher"],
div[class*="LayerSwitcher"] {
    color: #000 !important;
}

.ol-popup {
    position: absolute;
    color: #000 !important;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #cccccc;
    bottom: 12px;
    left: -50px;
    min-width: 280px;
}

    .ol-popup:after, .ol-popup:before {
        top: 100%;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
    }

    .ol-popup:after {
        border-top-color: white;
        border-width: 10px;
        left: 48px;
        margin-left: -10px;
    }

    .ol-popup:before {
        border-top-color: #cccccc;
        border-width: 11px;
        left: 48px;
        margin-left: -11px;
    }
.ol-popup-closer {
    text-decoration: none;
    position: absolute;
    top: 2px;
    right: 8px;
}

    .ol-popup-closer:after {
        content: "✖";
    }

/* Batch People grid: wrap header text and double the header row height */
.people-grid .rz-column-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
}

.people-grid .rz-column-header {
    height: auto !important;
    min-height: 52px;
    vertical-align: middle !important;
    white-space: normal !important;
}

/* ── MI Info: highlighted person names ─────────────────────────────────── */
/* These rules MUST be global (not scoped) because the <strong> tags are      */
/* injected via MarkupString and never receive Blazor's scoped CSS attribute.  */
/* Teal: distinct from red links, works in both dark and light mode.           */
.mi-inscription-text strong {
    color: #4dd0e1 !important;
    font-weight: 700;
}

html[data-bs-theme=light] .mi-inscription-text strong {
    color: #00696f !important;
}

/* ── Mobile responsiveness tweaks ──────────────────────────────────────── */
/* Ensure touch targets are large enough and page padding is tighter         */
@media (max-width: 576px) {
    .page-container {
        padding: 10px;
    }

    /* Larger tap targets for Radzen links inside data grids */
    .rz-grid-table a,
    .rz-data-grid a {
        display: inline-block;
        padding: 6px 2px;
        min-height: 36px;
        line-height: 1.4;
    }

    /* Wrap long text in grid cells rather than truncating */
    .rz-grid-table td,
    .rz-data-grid td {
        word-break: break-word;
    }

    /* Reduce header brand text size so it fits beside the sidebar button */
    .header-brand {
        font-size: 0.9rem;
    }

    /* Stack header links vertically if needed */
    .header-link {
        font-size: 0.85rem;
    }

    /* Full-width buttons on small screens */
    .page-container .rz-button {
        width: 100%;
        margin-bottom: 4px;
    }

    /* Reduce card padding */
    .rz-card {
        padding: 0.75rem !important;
    }
}