﻿/* Curanta Medewerker — basis CSS overlay op MudBlazor defaults */

:root {
    --mw-primary: #0E4F57;
    --mw-surface: #FFFFFF;
    --mw-background: #F7F7F4;
    --mw-border: #E5E5E2;
    --mw-ink-500: #737373;
}

body {
    background: var(--mw-background);
    /* Expliciete text-color zodat dark-mode MudThemeProvider's
       text-primary (#E6EDF1) doorslaat op gewone MudText/h-elementen.
       Zonder dit blijft de browser-default zwart en wordt H4 "Goedemorgen, ..."
       onleesbaar op dark surface (2026-05-25 visueel geverifieerd). */
    color: var(--mud-palette-text-primary, #1F1F1F);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.mud-drawer {
    background: var(--mw-surface);
    border-right: 1px solid var(--mw-border);
}

.mud-appbar {
    color: #FFFFFF;
}

.mud-appbar .mud-typography,
.mud-appbar .mud-icon-root,
.mud-appbar .mud-icon-button {
    color: #FFFFFF;
}

.mud-drawer .mud-navmenu {
    padding-top: 8px;
}

.mud-drawer .mud-nav-link {
    color: #1F2E3A;
    font-weight: 600;
    border-radius: 10px;
    margin: 2px 8px;
    min-height: 44px;
    opacity: 1;
}

.mud-drawer .mud-nav-link .mud-icon-root {
    color: #5B7280;
}

.mud-drawer .mud-nav-link:hover {
    background: rgba(11, 110, 110, 0.08);
    color: #0E4F57;
}

.mud-drawer .mud-nav-link:hover .mud-icon-root {
    color: #0E4F57;
}

.mud-drawer .mud-nav-link.mud-nav-link-active {
    background: rgba(11, 110, 110, 0.12);
    color: #0E4F57;
    font-weight: 700;
}

.mud-drawer .mud-nav-link.mud-nav-link-active .mud-icon-root {
    color: #0E4F57;
}

.mud-dark-mode .mud-drawer {
    background: #0E1B22;
    border-right-color: #1F3441;
}

.mud-dark-mode .mud-drawer .mud-nav-link {
    color: #E6EDF1;
}

.mud-dark-mode .mud-drawer .mud-nav-link .mud-icon-root {
    color: #9CB0BC;
}

.mud-dark-mode .mud-drawer .mud-nav-link:hover {
    background: rgba(63, 191, 184, 0.10);
    color: #FFFFFF;
}

.mud-dark-mode .mud-drawer .mud-nav-link:hover .mud-icon-root,
.mud-dark-mode .mud-drawer .mud-nav-link.mud-nav-link-active,
.mud-dark-mode .mud-drawer .mud-nav-link.mud-nav-link-active .mud-icon-root {
    color: #2FD3B6;
}

.mud-paper-outlined {
    border-color: var(--mw-border);
}

/* ----------------------------------------------------------------------------
   Dark mode — toggle in MedewerkerLayout zet `mud-dark-mode` op <body>.
   Onze --mw-* tokens worden ge-overridden zodat body/drawer/paper auto-volgen.
   MudBlazor's eigen palette (PaletteDark in Routes.razor) levert het meeste —
   deze regels patchen alleen onze custom CSS-variabelen + html-background.
   ---------------------------------------------------------------------------- */
body.mud-dark-mode,
.mud-dark-mode {
    --mw-surface:    #152832;
    --mw-background: #0E1B22;
    --mw-border:     #1F3441;
    --mw-ink-500:    #9CB0BC;
}

html:has(body.mud-dark-mode),
html.mud-dark-mode {
    background: #0E1B22;
}

/* MudLayout / MudMainContent transparent zodat body-bg doorslaat onderaan
   korte pagina's (anders ontstaat een licht-cream strook in dark mode). */
.mud-dark-mode .mud-layout,
.mud-dark-mode .mud-main-content {
    background-color: transparent !important;
}
.mud-dark-mode [data-testid="medewerker-shell"] {
    background: var(--mw-background);
    min-height: 100vh;
}

/* Safety-net voor MudPaper-wrappers die direct kleur uit het Mud-palette
   nemen werkt al via PaletteDark; alleen outlined-papers met hardcoded
   border krijgen hier het dark-equivalent. */
.mud-dark-mode .mud-paper.mud-paper-outlined {
    background-color: var(--mud-palette-surface, #152832) !important;
    border-color: var(--mud-palette-lines-default, #1F3441);
    color: var(--mud-palette-text-primary, #E6EDF1);
}

/* MudAlert filled-varianten zijn in dark mode te bright — temperen. */
.mud-dark-mode .mud-alert-filled-info     { background-color: #0E3A40 !important; color: #E6EDF1; }
.mud-dark-mode .mud-alert-filled-success  { background-color: #1A3326 !important; color: #E6EDF1; }
.mud-dark-mode .mud-alert-filled-warning  { background-color: #3A2C16 !important; color: #F0E0BC; }
.mud-dark-mode .mud-alert-filled-error    { background-color: #3A1F1F !important; color: #F4C9C9; }

/* MudTooltip leesbaar in dark mode. */
.mud-dark-mode .mud-tooltip {
    background-color: #1F3441 !important;
    color: #E6EDF1 !important;
}

/* Login-shell — full-height-centered wrapper rond de inlog-kaart. Class
   ipv inline `background:#F7F7F4` zodat dark mode automatisch volgt. */
.curanta-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F7F7F4;
}
.mud-dark-mode .curanta-login-shell {
    background: #0E1B22;
}

/* Login-titel: teal-600 (#0E4F57) op dark surface = contrast ~3.0 (WCAG-AA fail).
   In dark mode switchen we naar lichtere teal (#2FD3B6) voor >4.5:1 contrast. */
.curanta-login-title { color: #0E4F57; }
.mud-dark-mode .curanta-login-title { color: #2FD3B6 !important; }

/* In-app werkinstructies */
.help-content h1 { font-size: 1.4rem; font-weight: 700; margin: 1rem 0 0.5rem; }
.help-content h2 { font-size: 1.15rem; font-weight: 700; margin: 1.2rem 0 0.4rem;
                   border-bottom: 1px solid var(--mud-palette-lines-default); padding-bottom: 4px; }
.help-content h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 0.3rem; }
.help-content p  { margin: 0.5rem 0; line-height: 1.6; }
.help-content table { border-collapse: collapse; width: 100%; margin: 0.75rem 0; }
.help-content th, .help-content td { border: 1px solid var(--mud-palette-lines-default);
                                     padding: 6px 10px; font-size: 0.875rem; }
.help-content th { background: var(--mud-palette-background-grey); font-weight: 600; }
.help-content code { background: var(--mud-palette-background-grey); padding: 1px 4px;
                     border-radius: 3px; font-size: 0.85em; }
.help-content blockquote { border-left: 3px solid var(--mud-palette-primary); margin: 0.5rem 0;
                           padding: 4px 12px; background: var(--mud-palette-background-grey);
                           border-radius: 0 4px 4px 0; }
.help-content ul, .help-content ol { margin: 0.5rem 0; padding-left: 1.5rem; }
.help-content li { margin: 0.25rem 0; }
.help-content a { color: var(--mud-palette-primary); }

/* ── Offline registreren boven de Blazor-herverbind-overlay ──────────────────
   Blazor Server legt bij verbindingsverlies een schermvullende herverbind-overlay
   over de pagina. Die overlay vangt elke klik af, terwijl juist dán de
   offline-wachtrij (offline-db.js) het werk moet opvangen. De klasse
   .curanta-offline wordt door offline-db.js op <body> gezet zodra de browser
   offline is; alleen dán tillen we de rijen die wij zelf afvangen boven de
   overlay uit. Online verandert er niets. */
body.curanta-offline [data-offline-interventie-row],
body.curanta-offline [data-offline-tijdregistratie-row],
body.curanta-offline [data-offline-overdracht-punt],
body.curanta-offline [data-offline-overdracht-toelichting],
body.curanta-offline [data-offline-overdracht-samenvatting],
body.curanta-offline [data-offline-overdracht-submit],
body.curanta-offline [data-offline-overdracht-status],
body.curanta-offline [data-offline-soep-probleem],
body.curanta-offline [data-offline-soep-subjectief],
body.curanta-offline [data-offline-soep-objectief],
body.curanta-offline [data-offline-soep-evaluatie],
body.curanta-offline [data-offline-soep-plan],
body.curanta-offline [data-offline-soep-lekentaal],
body.curanta-offline [data-offline-soep-submit],
body.curanta-offline [data-offline-soep-status] {
    position: relative;
    z-index: 2147483000;
}

/* Het vinkje "zichtbaar in het cliëntportaal" staat er bewust niet bij. Dat is een
   @bind-Value naar de server, en offline verandert er niets als je erop drukt. Het
   boven de overlay tillen zou een vinkje opleveren dat wel klikbaar oogt en niets
   doet — misleidender dan een vinkje dat niet reageert. De tekst onder de knop
   zegt dat die keuze offline vaststaat. */

/* ── Skiplink ─────────────────────────────────────────────────────────────
   Visueel verborgen tot hij focus krijgt; dan springt hij zichtbaar in beeld.
   Bewust géén display:none of visibility:hidden — dan zou hij ook voor
   toetsenbord- en schermlezergebruikers verdwijnen, precies degenen voor wie
   hij bedoeld is. WCAG 2.2 succescriterium 2.4.1 (Blokken omzeilen), niveau A.
   Identiek aan Curanta.Host/wwwroot/css/curanta.css en
   Curanta.Portaal/wwwroot/css/portaal.css; dit portaal was als enige host nog
   zonder skiplink (code review 2026-08-02, bevinding 78). */
.curanta-skiplink {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 12px 20px;
    background: var(--mw-primary, #0E4F57);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.curanta-skiplink:focus,
.curanta-skiplink:focus-visible {
    left: 0;
    outline: 3px solid #fff;
    outline-offset: -6px;
}

/* ── Tekstcontrast (WCAG 2.2 AA, 1.4.3) ───────────────────────────────────
   B-09, zelfde correctie als in Curanta.Host. Het lichte palet van deze host
   zet geen eigen Info-kleur, dus geldt de MudBlazor-standaard — en die haalt
   als tekst op wit de 4,5:1 niet. Alleen de tekst en het icoon schuiven mee;
   vlakken, randen en het merk blijven ongemoeid.

   De var-fallback is hier de werkende waarde: deze stylesheet kent
   --curanta-teal-700 niet, die staat alleen in de backoffice-stylesheet. */

.mud-alert-outlined-info .mud-alert-message,
.mud-alert-text-info .mud-alert-message,
.mud-alert-outlined-info .mud-alert-icon,
.mud-alert-text-info .mud-alert-icon {
    color: var(--curanta-teal-700, #0E4F57);
}

.mud-alert-filled-info,
.mud-alert-filled-info .mud-alert-message,
.mud-alert-filled-info .mud-alert-icon {
    color: var(--curanta-ink-900, #0E1F2C);
}

/* In donkere modus is het omgekeerd: daar staat de lichte teal juist goed op
   een donkere achtergrond, dus laten we die staan. */
.mud-dark-mode .mud-alert-outlined-info .mud-alert-message,
.mud-dark-mode .mud-alert-text-info .mud-alert-message,
.mud-dark-mode .mud-alert-outlined-info .mud-alert-icon,
.mud-dark-mode .mud-alert-text-info .mud-alert-icon {
    color: #2FD3B6;
}

code {
    color: #B02A6B;
}

.mud-dark-mode code {
    color: #F0A8C8;
}
