﻿/* ---------- openSharehouse: Schrift ---------- */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2");
}

/* ---------- Theme-Tokens ----------
   Radzen legt seine Variablen auf :root; html:root gewinnt per Spezifität, egal in welcher
   Reihenfolge RadzenTheme den Theme-Link beim Umschalten einhängt. Dark wird über den geladenen
   Theme-Link erkannt, weil Radzen sonst keine Klasse/kein Attribut für das aktive Theme setzt. */
html:root {
    --osh-petrol: #0f3b40;
    --osh-lime: #9ccc2e;
    --osh-green: #3f7a12;
    --osh-wordmark-open: var(--osh-green);
    --osh-wordmark-name: var(--osh-petrol);
    --osh-mark: url("img/mark.svg");
    --osh-tile-bg: var(--osh-petrol);
    --osh-tile-fg: var(--osh-lime);
    --osh-line: #e2e5e7;

    --rz-text-font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    --rz-border-radius: 6px;

    --rz-primary: #0f3b40;
    --rz-primary-light: #2d5a5f;
    --rz-primary-lighter: rgba(15, 59, 64, 0.08);
    --rz-primary-dark: #0a2b2f;
    --rz-primary-darker: #071f22;
    --rz-on-primary: #ffffff;
    --rz-on-primary-lighter: #0f3b40;

    --rz-secondary: #3f7a12;
    --rz-secondary-light: #5a9428;
    --rz-secondary-lighter: rgba(63, 122, 18, 0.12);
    --rz-secondary-dark: #33620e;
    --rz-secondary-darker: #284d0b;
    --rz-on-secondary-lighter: #3f7a12;

    --rz-success: #3f7a12;
    --rz-success-light: #5a9428;
    --rz-success-lighter: rgba(63, 122, 18, 0.12);
    --rz-success-dark: #33620e;
    --rz-success-darker: #284d0b;
    --rz-on-success-lighter: #3f7a12;

    --rz-body-background-color: #f4f5f6;
    --rz-header-background-color: var(--rz-base-background-color);
    /* Material-Light färbt den Header-Text weiß (für einen farbigen Header) – unser Header ist hell. */
    --rz-header-color: var(--rz-text-color);
    --rz-header-shadow: none;
    --rz-footer-background-color: transparent;
}

html:root:has(link[href*="material-dark"]) {
    --osh-wordmark-open: #b5e04a;
    --osh-wordmark-name: #ffffff;
    --osh-mark: url("img/mark-white.svg");
    --osh-tile-bg: #143c41;
    --osh-tile-fg: #b5e04a;
    --osh-line: #1f4a4f;

    --rz-base-50: #e6efef;
    --rz-base-100: #b4cbcd;
    --rz-base-200: #7fa3a6;
    --rz-base-300: #4a7a7e;
    --rz-base-400: #2f6267;
    --rz-base-500: #24555a;
    --rz-base-600: #1c4a4f;
    --rz-base-700: #143c41;
    --rz-base-800: #0e2f33;
    --rz-base-900: #081d20;

    /* Lime als Primärfarbe – Text darauf dunkel, Weiß hätte zu wenig Kontrast. */
    --rz-primary: #b5e04a;
    --rz-primary-light: #c6ea6c;
    --rz-primary-lighter: rgba(181, 224, 74, 0.14);
    --rz-primary-dark: #9ccc2e;
    --rz-primary-darker: #84b01f;
    --rz-on-primary: #0b2427;
    --rz-on-primary-light: #0b2427;
    --rz-on-primary-dark: #0b2427;
    --rz-on-primary-darker: #0b2427;
    --rz-on-primary-lighter: #b5e04a;

    --rz-secondary: #9ccc2e;
    --rz-secondary-light: #b5e04a;
    --rz-secondary-lighter: rgba(156, 204, 46, 0.14);
    --rz-secondary-dark: #84b01f;
    --rz-secondary-darker: #6e9418;
    --rz-on-secondary: #0b2427;
    --rz-on-secondary-lighter: #9ccc2e;

    --rz-success: #9ccc2e;
    --rz-success-light: #b5e04a;
    --rz-success-lighter: rgba(156, 204, 46, 0.16);
    --rz-success-dark: #84b01f;
    --rz-success-darker: #6e9418;
    --rz-on-success: #0b2427;
    --rz-on-success-lighter: #b5e04a;

    --rz-body-background-color: var(--rz-base-900);
    --rz-header-background-color: var(--rz-base-700);
}

/* ---------- Grundlayout (Top-Navigation, siehe docs/ADR/0006-top-navigation.md) ---------- */
body {
    font-family: var(--rz-text-font-family);
}

.osh-layout {
    grid-template-rows: auto 1fr auto;
    grid-template-columns: 1fr;
    grid-template-areas: "rz-header" "rz-body" "rz-footer";
}

.osh-header {
    border-bottom: 1px solid var(--osh-line);
}

.osh-header-inner,
.osh-container,
.osh-footer {
    max-width: 1200px;
    margin-inline: auto;
    width: 100%;
    box-sizing: border-box;
}

.osh-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 4rem;
    padding-inline: 1rem;
}

.osh-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    white-space: nowrap;
}

.osh-mark {
    width: 2rem;
    height: 2rem;
    background: var(--osh-mark) center / contain no-repeat;
}

.osh-wordmark {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--osh-wordmark-name);
}

.osh-wordmark-open {
    font-weight: 400;
    color: var(--osh-wordmark-open);
}

.osh-nav.rz-menu {
    flex: 1;
    --rz-menu-background-color: transparent;
    --rz-menu-top-item-background-color: transparent;
    --rz-menu-top-item-color: var(--rz-text-secondary-color);
    --rz-menu-top-item-icon-color: var(--rz-text-secondary-color);
    --rz-menu-top-item-hover-color: var(--rz-primary);
    --rz-menu-top-item-icon-hover-color: var(--rz-primary);
    --rz-menu-top-item-selected-color: var(--rz-primary);
    --rz-menu-top-item-padding-inline: 0.75rem;
}

.osh-nav .rz-navigation-item-link {
    font-weight: 600;
}

.osh-nav .rz-navigation-item-link.active,
.osh-nav .rz-navigation-item-link.active .rzi {
    color: var(--rz-primary);
}

.osh-nav .rz-navigation-item-link.active {
    box-shadow: inset 0 -3px 0 var(--rz-primary);
}

.osh-header-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-inline-start: auto;
}

.osh-container {
    padding: 1.5rem 1rem 2rem;
}

.osh-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--rz-text-tertiary-color);
}

.osh-footer a {
    color: inherit;
}

.osh-footer a:hover {
    color: var(--rz-text-color);
}

/* Tabellen mit langen Zellen (Back-Office): umbrechen statt abschneiden, Links in Markenfarbe statt Browser-Blau. */
/* !important nötig: Radzen kürzt Zellen über .rz-text-truncate mit eigenem !important. */
.osh-wrap-grid td,
.osh-wrap-grid .rz-cell-data {
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
}

.osh-wrap-grid .rz-button {
    white-space: nowrap;
    overflow-wrap: normal;
}

.osh-grid-link {
    color: var(--rz-secondary);
    font-weight: 600;
    text-decoration: none;
}

.osh-grid-link:hover,
.osh-grid-link:focus-visible {
    text-decoration: underline;
}

.osh-expired {
    color: var(--rz-danger);
    font-weight: 700;
}

/* ---------- Standortbilder ---------- */
.osh-image-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.osh-image-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.osh-image-item img {
    width: 140px;
    height: 105px;
    object-fit: cover;
    border-radius: var(--rz-border-radius);
    border: 1px solid var(--osh-line);
}

.osh-upload {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--rz-border-radius);
    background: var(--rz-primary);
    color: var(--rz-on-primary);
    font-weight: 600;
    cursor: pointer;
}

.osh-upload input[type=file] {
    display: none;
}

.osh-upload.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.osh-result-photo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--rz-border-radius);
    cursor: zoom-in;
}

.osh-gallery {
    height: min(70vh, 640px);
}

.osh-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--rz-base-900);
}

.osh-gallery-count {
    display: block;
    margin: 0.35rem 0 0;
    text-align: center;
    color: var(--rz-text-secondary-color);
}

/* Vorschauleiste: zeigt auf einen Blick, dass es mehrere Bilder gibt; scrollt bei vielen Bildern waagerecht. */
.osh-gallery-strip {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-bottom: 0.25rem;
    overflow-x: auto;
}

.osh-gallery-thumb {
    display: block;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--rz-border-radius);
    background: none;
    cursor: pointer;
    opacity: 0.6;
}

.osh-gallery-thumb:hover,
.osh-gallery-thumb:focus-visible {
    opacity: 1;
}

.osh-gallery-thumb.is-active {
    border-color: var(--rz-secondary);
    opacity: 1;
}

.osh-gallery-strip .osh-gallery-thumb img {
    display: block;
    width: 96px;
    height: 72px;
    object-fit: cover;
    border: 0;
    border-radius: calc(var(--rz-border-radius) - 2px);
}

/* ---------- Bewertungen (Sterne, ADR 0008) ---------- */
.osh-stars {
    display: inline-flex;
    align-items: center;
    color: var(--rz-secondary);
    line-height: 1;
}

.osh-stars:focus-visible {
    outline: 2px solid var(--rz-secondary);
    outline-offset: 2px;
    border-radius: var(--rz-border-radius);
}

.osh-stars .osh-star {
    font-size: 1.25rem;
}

.osh-star.is-full {
    font-variation-settings: 'FILL' 1;
}

.osh-star.is-empty {
    opacity: 0.45;
}

.osh-stars-input .osh-star {
    font-size: 2rem;
}

.osh-stars-input {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.osh-star-slot {
    position: relative;
    display: inline-flex;
}

.osh-star-half {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.osh-star-half.is-left { left: 0; }
.osh-star-half.is-right { right: 0; }

.osh-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--rz-text-secondary-color);
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.osh-rating-badge:hover span {
    text-decoration: underline;
}

.osh-review-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.osh-review {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--osh-line);
}

.osh-review-text {
    margin: 0.35rem 0 0;
    white-space: pre-line;
}

/* ---------- Zwei-Faktor-Anmeldung ---------- */
.osh-qr {
    display: block;
    margin: 0.5rem 0 1rem;
    border-radius: var(--rz-border-radius);
    background: #ffffff; /* QR-Code braucht hellen Grund, auch im Dunkelmodus */
    padding: 0.5rem;
}

.osh-key {
    font-size: 1rem;
    letter-spacing: 0.05em;
    word-break: break-all;
}

.osh-steps li {
    margin-bottom: 0.35rem;
}

.osh-recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0.35rem 2rem;
    padding: 0;
    list-style: none;
    font-size: 1rem;
}

/* ---------- Impressum / Datenschutz ---------- */
.osh-legal {
    max-width: 760px;
    line-height: 1.6;
}

.osh-legal h1 {
    font-size: 1.75rem;
    margin-block: 0 1rem;
}

.osh-legal h2 {
    font-size: 1.1rem;
    margin-block: 1.75rem 0.5rem;
}

@media (max-width: 900px) {
    .osh-header-inner {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        padding-block: 0.5rem;
    }

    .osh-nav.rz-menu {
        order: 3;
        flex-basis: 100%;
    }
}

/* ---------- Gemeinsame Bausteine ---------- */
.osh-panel {
    background: var(--rz-base-background-color);
    border: 1px solid var(--osh-line);
    border-radius: var(--rz-border-radius);
}

.osh-tile {
    display: grid;
    place-items: center;
    flex: none;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: var(--rz-border-radius);
    background: var(--osh-tile-bg);
    color: var(--osh-tile-fg);
}

.osh-tile .rzi {
    font-size: 2.25rem;
}

.osh-label {
    font-size: 0.8rem;
    color: var(--rz-text-tertiary-color);
}

.osh-value {
    color: var(--rz-text-title-color);
}

.osh-amount {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--rz-success);
}

/* Status-Pille wie im Postfach-Mockup: Umriss + Punkt in Statusfarbe. */
.osh-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0.7rem;
    border: 1px solid var(--osh-line);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--osh-status-color, var(--rz-text-secondary-color));
    white-space: nowrap;
}

.osh-status::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

.osh-status-offen { --osh-status-color: var(--rz-info); }
.osh-status-vergeben,
.osh-status-angenommen { --osh-status-color: var(--rz-success); }
.osh-status-inpruefung { --osh-status-color: var(--rz-warning); }
.osh-status-abgelehnt { --osh-status-color: var(--rz-danger); }

/* ---------- Startseite ---------- */
.osh-hero {
    padding: 2.5rem 2rem;
    border-radius: var(--rz-border-radius);
    background: var(--osh-petrol);
    color: #ffffff;
}

html:root:has(link[href*="material-dark"]) .osh-hero {
    background: var(--rz-base-700);
}

.osh-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.osh-hero h1 em {
    font-style: normal;
    color: #b5e04a;
}

.osh-hero p {
    margin: 0 0 1.5rem;
    max-width: 40rem;
    color: #d5e3e4;
}

.osh-hero .osh-quicksearch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
    padding: 1rem;
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-background-color);
}

/* ---------- Suche ---------- */
.osh-result {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.osh-result-main {
    flex: 1;
    min-width: 0;
}

.osh-result-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rz-primary);
}

.osh-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--osh-line);
}

.osh-result-price {
    text-align: end;
}

@media (max-width: 640px) {
    .osh-result {
        flex-wrap: wrap;
    }

    .osh-result-price {
        text-align: start;
        flex-basis: 100%;
    }
}

/* Rollenkacheln: in einer Reihe gleich hoch, Button immer unten – unabhängig von der Textlänge. */
.osh-role-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    box-sizing: border-box;
}

.osh-role-card > .rz-button {
    margin-top: auto;
}

/* ---------- Suche: Liste | Karte ---------- */
.osh-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 42%);
    gap: 1rem;
    align-items: start;
}

.osh-search-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.osh-search-list .osh-result {
    cursor: pointer;
}

.osh-result.is-selected {
    border-color: var(--rz-secondary);
    box-shadow: 0 0 0 1px var(--rz-secondary);
}

.osh-search-map {
    position: sticky;
    top: 1rem;
    height: max(26rem, calc(100vh - 14rem));
}

.osh-view-switch {
    display: none;
}

/* Leaflet bringt eigene z-Indizes bis 1000 mit – auf die Karte begrenzen. */
.osh-map-wrap {
    position: relative;
    height: 100%;
    isolation: isolate;
}

.osh-map {
    height: 100%;
    border: 1px solid var(--osh-line);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-200);
    font-family: inherit;
}

html:root:has(link[href*="material-dark"]) .osh-map {
    background: var(--rz-base-800);
}

html:root:has(link[href*="material-dark"]) .osh-map .leaflet-control-attribution {
    background: rgba(8, 29, 32, 0.8);
    color: var(--rz-text-secondary-color);
}

html:root:has(link[href*="material-dark"]) .osh-map .leaflet-control-attribution a {
    color: var(--rz-secondary);
}

.osh-map-hint {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    z-index: 1000;
    transform: translateX(-50%);
    padding: 0.35rem 0.75rem;
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-background-color);
    border: 1px solid var(--osh-line);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Marker: Tropfen in Markenfarbe, Auswahl in Lime bzw. Petrol (Kontrast je Theme). */
.osh-pin span {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0 auto;
    border: 2px solid #ffffff;
    border-radius: 50% 50% 50% 0;
    background: var(--osh-petrol);
    transform: rotate(-45deg);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s;
}

.osh-pin.is-selected span {
    background: var(--osh-lime);
    border-color: var(--osh-petrol);
    transform: rotate(-45deg) scale(1.3);
}

html:root:has(link[href*="material-dark"]) .osh-pin span {
    background: #b5e04a;
    border-color: var(--osh-petrol);
}

html:root:has(link[href*="material-dark"]) .osh-pin.is-selected span {
    background: #ffffff;
}

.osh-origin {
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--rz-info);
    box-shadow: 0 0 0 2px var(--rz-info);
}

.osh-radius {
    stroke: var(--rz-primary);
    stroke-width: 2;
    stroke-dasharray: 6 4;
    fill: var(--rz-primary);
    fill-opacity: 0.06;
}

@media (max-width: 900px) {
    .osh-search {
        grid-template-columns: 1fr;
    }

    .osh-view-switch {
        display: inline-flex;
    }

    .osh-search:not(.show-map) .osh-search-map,
    .osh-search.show-map .osh-search-list {
        display: none;
    }

    .osh-search-map {
        position: static;
        height: 70vh;
    }

    .osh-map-hint {
        white-space: normal;
        width: max-content;
        max-width: 90%;
    }
}

/* ---------- Gesuche (Postfach: Liste | Detail) ---------- */
.osh-inbox {
    display: grid;
    grid-template-columns: minmax(18rem, 26rem) 1fr;
    min-height: 32rem;
    overflow: hidden;
}

.osh-inbox-list {
    border-inline-end: 1px solid var(--osh-line);
    overflow-y: auto;
}

.osh-inbox-item {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--osh-line);
    border-inline-start: 3px solid transparent;
    color: inherit;
    text-decoration: none;
}

.osh-inbox-item:hover {
    background: var(--rz-base-100);
}

html:root:has(link[href*="material-dark"]) .osh-inbox-item:hover {
    background: var(--rz-base-700);
}

.osh-inbox-item.active {
    background: var(--rz-secondary-lighter);
    border-inline-start-color: var(--rz-secondary);
}

.osh-inbox-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--rz-primary-lighter);
    color: var(--rz-primary);
}

.osh-inbox-text {
    flex: 1;
    min-width: 0;
}

.osh-inbox-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
}

.osh-inbox-sub {
    display: block;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.osh-inbox-count {
    min-width: 1.4rem;
    padding: 0 0.35rem;
    border-radius: 4px;
    background: var(--rz-danger);
    color: #ffffff;
    font-size: 0.75rem;
    text-align: center;
}

.osh-inbox-detail {
    padding: 1.5rem 2rem;
    overflow-y: auto;
}

.osh-inbox-empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--rz-text-tertiary-color);
}

.osh-back {
    display: none;
}

.osh-conditions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 1rem 1.5rem;
    margin: 0;
}

.osh-conditions dd {
    margin: 0.15rem 0 0;
    color: var(--rz-text-title-color);
}

.osh-section-title {
    margin: 2rem 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rz-text-title-color);
}

.osh-offer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
}

.osh-offer-main {
    flex: 1;
    min-width: 12rem;
}

@media (max-width: 900px) {
    .osh-inbox {
        grid-template-columns: 1fr;
    }

    .osh-inbox-list {
        border-inline-end: none;
    }

    /* Zweistufig: mit Auswahl nur Detail, ohne Auswahl nur Liste. */
    .osh-inbox.has-selection .osh-inbox-list,
    .osh-inbox:not(.has-selection) .osh-inbox-detail {
        display: none;
    }

    .osh-inbox-detail {
        padding: 1rem;
    }

    .osh-back {
        display: inline-flex;
        margin-bottom: 1rem;
    }
}

/* ---------- Blazor-Standard ---------- */
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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
}

/* ---------- Anmeldung / Registrierung (statisches SSR, schlichte Formulare im Radzen-Look) ---------- */
.osh-auth {
    max-width: 28rem;
    margin: 2rem auto;
    padding: 2rem;
}

.osh-auth h1 {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--rz-text-title-color);
}

.osh-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.osh-form label,
.osh-form legend {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--rz-text-secondary-color);
}

.osh-form input:not([type=checkbox]):not([type=radio]) {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--rz-base-400);
    border-radius: var(--rz-border-radius);
    background: var(--rz-base-background-color);
    color: var(--rz-text-color);
    font: inherit;
    font-size: 1rem;
}

.osh-form input:focus-visible {
    outline: 2px solid var(--rz-primary);
    outline-offset: 1px;
}

.osh-form .osh-check {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--rz-text-color);
}

.osh-role-choice {
    margin: 0;
    padding: 0;
    border: none;
}

.osh-role-choice legend {
    margin-bottom: 0.4rem;
}

/* Unternehmensfelder nur bei gewählter Rolle Anbieter – ohne JavaScript. */
.osh-company-fields {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
}

.osh-form:has(input[type=radio][value=Anbieter]:checked) .osh-company-fields {
    display: flex;
}

.osh-btn {
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: var(--rz-border-radius);
    background: var(--rz-primary);
    color: var(--rz-on-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.osh-btn:hover {
    background: var(--rz-primary-dark);
}

.osh-icon-link {
    display: inline-flex;
    vertical-align: middle;
    color: var(--rz-secondary);
}

.osh-auth a.osh-btn-link {
    display: inline-block;
    color: var(--rz-on-primary);
    text-decoration: none;
}

.osh-btn-danger,
.osh-btn-danger:hover {
    background: var(--rz-danger);
    color: var(--rz-on-danger);
}

.osh-profile h2 {
    font-size: 1.1rem;
    margin-block: 1.75rem 0.5rem;
}

.osh-profile-data {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.25rem;
    margin: 0;
}

.osh-profile-data dt {
    color: var(--rz-text-secondary-color);
}

.osh-profile-data dd {
    margin: 0;
    font-weight: 600;
}

.osh-auth-links {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

/* Schlichte Links der SSR-Seiten haben kein Radzen-Styling – sonst Browser-Blau. Markenfarbe
   (hell: Grün, dunkel: Lime) über --rz-secondary. */
.osh-auth a,
.osh-legal a {
    color: var(--rz-secondary);
    text-decoration: none;
    font-weight: 600;
}

.osh-auth a:hover,
.osh-auth a:focus-visible,
.osh-legal a:hover,
.osh-legal a:focus-visible {
    text-decoration: underline;
}

.osh-auth .validation-message {
    font-size: 0.8rem;
}

/* Spezifischer als Radzens Header-Linkfarbe – sonst weiß auf weißem Header (heller Modus). */
.osh-header-tools .osh-user {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color);
    white-space: nowrap;
    text-decoration: none;
}

.osh-header-tools .osh-user:hover,
.osh-header-tools .osh-user:focus-visible {
    color: var(--rz-text-color);
    text-decoration: underline;
}

.osh-logout {
    display: contents;
}

/* Firmen-Login (OIDC) unter dem Passwort-Formular */
.osh-sso {
    margin-top: 1.5rem;
}

.osh-sso-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--rz-text-tertiary-color);
}

.osh-sso-divider::before,
.osh-sso-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--osh-line);
}

.osh-btn-secondary {
    background: transparent;
    border: 1px solid var(--rz-primary);
    color: var(--rz-primary);
}

.osh-btn-secondary:hover {
    background: var(--rz-primary-lighter);
}

/* ---------- Nachrichten (Gesuch-Detail, Tab "Nachrichten") ---------- */
.osh-chat {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.osh-chat.has-list {
    grid-template-columns: minmax(10rem, 14rem) 1fr;
}

.osh-chat-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.osh-chat-partner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid transparent;
    border-radius: var(--rz-border-radius);
    background: transparent;
    color: var(--rz-text-color);
    font: inherit;
    text-align: start;
    cursor: pointer;
}

.osh-chat-partner:hover {
    background: var(--rz-base-100);
}

.osh-chat-partner.active {
    border-color: var(--rz-secondary);
    background: var(--rz-secondary-lighter);
    font-weight: 700;
}

.osh-chat-thread {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--osh-line);
    border-radius: var(--rz-border-radius);
}

.osh-chat-head {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--osh-line);
    font-weight: 700;
    color: var(--rz-text-title-color);
}

.osh-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 26rem;
    padding: 1rem;
    overflow-y: auto;
}

.osh-msg {
    align-self: flex-start;
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem 0.75rem 0.75rem 0.2rem;
    background: var(--rz-base-200);
}

.osh-msg.own {
    align-self: flex-end;
    border-radius: 0.75rem 0.75rem 0.2rem 0.75rem;
    background: var(--rz-secondary-lighter);
}

html:root:has(link[href*="material-dark"]) .osh-msg:not(.own) {
    background: var(--rz-base-700);
}

.osh-msg-meta {
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
    color: var(--rz-text-tertiary-color);
}

.osh-msg-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.osh-chat-compose {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid var(--osh-line);
}

.osh-chat-closed {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--osh-line);
}

.osh-unread {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--rz-text-secondary-color);
    text-decoration: none;
}

.osh-unread .osh-inbox-count {
    position: absolute;
    top: -0.4rem;
    right: -0.6rem;
}

@media (max-width: 640px) {
    .osh-chat.has-list {
        grid-template-columns: 1fr;
    }
}

/* Gesuchsliste: rot = ungelesene Nachrichten, neutral = Anzahl Angebote */
.osh-unread-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--rz-danger);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
}

.osh-unread-chip .rzi {
    font-size: 0.9rem;
}

.osh-offer-count {
    min-width: 1.4rem;
    padding: 0 0.35rem;
    border: 1px solid var(--osh-line);
    border-radius: 4px;
    color: var(--rz-text-secondary-color);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}


/* Gemeinsamer Ort mehrerer Marker (gleiche PLZ), searchMap.js */
.osh-pin-hub {
    stroke: var(--rz-primary);
    stroke-width: 2;
    fill: var(--rz-base-background-color);
    fill-opacity: 1;
}
