/* WOA-PATCH:oberflaeche-hell-2026-10-17 - helle Darstellung (angelehnt an 1x1it-solutions.de)
   Die dunkle Darstellung bleibt unveraendert (woa.css). Fest eingebaute Template-Farben stellt
   woa-hell-tokens.css um (erzeugt von tools/woa_theme_tokens.py). */
:root[data-bs-theme="light"] {
  color-scheme: light;
  --woa-bg:       #e9ebec;
  --woa-surface:  #f6f7f7;
  --woa-surface2: #eef0f1;
  --woa-border:   #c6cbcf;
  --woa-accent:   #0a6590;
  --woa-accent2:  #2f7a52;
  --woa-warn:     #9a6700;
  --woa-danger:   #a8231a;
  --woa-text:     #1f2528;
  --woa-muted:    #4e565c;
  --woa-surface-alt: #e1e4e5;
  --woa-card:     #f6f7f7;
  --woa-info:     #0b6b85;
  --bs-body-bg: #e9ebec;
  --bs-body-color: #1f2528;
  --bs-secondary-color: #4e565c;
  --bs-tertiary-bg: #eef0f1;
  --bs-border-color: #c6cbcf;
  --bs-link-color: #0a6590;
  --bs-link-color-rgb: 10,101,144;
  --bs-link-hover-color: #084c6c;
  --bs-emphasis-color: #000;
}
:root[data-bs-theme="dark"] { color-scheme: dark; }

[data-bs-theme="light"] body { background: var(--woa-bg); color: var(--woa-text); }
[data-bs-theme="light"] .text-muted,
[data-bs-theme="light"] .text-secondary { color: #4e565c !important; }
[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select { background-color: #fff; border-color: #c6cbcf; color: #1f2528; }
[data-bs-theme="light"] .form-control:disabled,
[data-bs-theme="light"] .form-control[readonly] { background-color: #eef0f1; }
[data-bs-theme="light"] .form-control::placeholder { color: #7a8288; }
[data-bs-theme="light"] .modal-content,
[data-bs-theme="light"] .dropdown-menu,
[data-bs-theme="light"] .offcanvas,
[data-bs-theme="light"] .popover,
[data-bs-theme="light"] .list-group-item { background-color: #f6f7f7; color: #1f2528; }
[data-bs-theme="light"] .table { --bs-table-color: #1f2528; --bs-table-striped-color: #1f2528; --bs-table-hover-color: #1f2528;
  --bs-table-striped-bg: rgba(15,23,42,.035); --bs-table-hover-bg: rgba(15,23,42,.06); --bs-table-border-color: #d5d9dc; }
[data-bs-theme="light"] .table thead th { color: #4e565c; border-bottom-color: #c6cbcf; }
[data-bs-theme="light"] .table-dark { --bs-table-bg: #e1e4e5; --bs-table-color: #1f2528; --bs-table-border-color: #c6cbcf; }
[data-bs-theme="light"] .card-header { background: #eef0f1; }
[data-bs-theme="light"] #sidebar .nav-link.active { color: #0a6590; border-left-color: #0a6590; }

/* Bootstrap-Klassen, die fuer den dunklen Hintergrund gesetzt wurden */
[data-bs-theme="light"] .btn-outline-light { --bs-btn-color: #3d454b; --bs-btn-border-color: #b5bcc1; --bs-btn-hover-color: #1f2528;
  --bs-btn-hover-bg: #dde1e3; --bs-btn-hover-border-color: #9aa2a8; --bs-btn-active-bg: #d2d7da; --bs-btn-active-color: #1f2528; --bs-btn-active-border-color: #9aa2a8; }
[data-bs-theme="light"] .btn-outline-light:hover { background: #dde1e3; color: #1f2528; }
[data-bs-theme="light"] .btn-light { --bs-btn-bg: #e1e4e5; --bs-btn-border-color: #c6cbcf; }
[data-bs-theme="light"] .text-light,
[data-bs-theme="light"] .text-white:not(.btn):not(.badge):not([class*="bg-"]) { color: #1f2528 !important; }
[data-bs-theme="light"] .bg-dark:not(.badge) { background-color: #e1e4e5 !important; color: #1f2528; }
[data-bs-theme="light"] .badge.bg-dark { background-color: #4e565c !important; }
[data-bs-theme="light"] .bg-black { background-color: #dde1e3 !important; }
[data-bs-theme="light"] .navbar-dark,
[data-bs-theme="light"] .navbar[data-bs-theme="dark"] { --bs-navbar-color: #3d454b; --bs-navbar-hover-color: #1f2528; --bs-navbar-brand-color: #1f2528; --bs-navbar-brand-hover-color: #000; }
[data-bs-theme="light"] .btn-close { filter: none; }
[data-bs-theme="light"] .alert { --bs-alert-color: inherit; }
[data-bs-theme="light"] .link-light { color: #0a6590 !important; }
[data-bs-theme="light"] .border-secondary { border-color: #c6cbcf !important; }
[data-bs-theme="light"] .nav-tabs { --bs-nav-tabs-link-active-bg: #f6f7f7; --bs-nav-tabs-link-active-color: #1f2528; --bs-nav-tabs-border-color: #c6cbcf; --bs-nav-tabs-link-active-border-color: #c6cbcf #c6cbcf #f6f7f7; }
[data-bs-theme="light"] * { scrollbar-color: #b5bcc1 transparent; }

/* ── Umschalter Darstellung / Sprache ── */
.woa-ui { position: relative; display: inline-flex; }
.woa-ui-knopf { background: none; border: 0; color: var(--woa-muted); font-size: 1.1rem; line-height: 1; padding: .25rem .5rem; border-radius: .4rem; display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.woa-ui-knopf:hover { color: var(--woa-accent); background: var(--woa-surface2); }
.woa-ui-knopf .woa-ui-sp { font-size: .7rem; font-weight: 700; letter-spacing: .03em; }
.woa-ui-menue { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 2000; min-width: 220px; background: var(--woa-surface, #1a1d24);
  border: 1px solid var(--woa-border, #2d323d); border-radius: .6rem; box-shadow: 0 8px 28px rgba(0,0,0,.28); padding: .55rem; display: none; color: var(--woa-text, #e2e8f0); }
.woa-ui.offen .woa-ui-menue { display: block; }
.woa-ui-menue.unten { bottom: auto; top: calc(100% + 6px); left: auto; right: 0; }
.woa-ui-titel { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--woa-muted, #94a3b8); font-weight: 700; margin: .15rem .2rem .3rem; }
.woa-ui-gruppe { display: flex; gap: .25rem; margin-bottom: .55rem; }
.woa-ui-gruppe:last-child { margin-bottom: 0; }
.woa-ui-gruppe button { flex: 1; border: 1px solid var(--woa-border, #2d323d); background: transparent; color: var(--woa-text, #e2e8f0); border-radius: .4rem;
  padding: .35rem .3rem; font-size: .78rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; cursor: pointer; }
.woa-ui-gruppe button i { font-size: 1rem; }
.woa-ui-gruppe button:hover { border-color: var(--woa-accent, #3b82f6); }
.woa-ui-gruppe button[aria-pressed="true"] { background: var(--woa-accent, #3b82f6); border-color: var(--woa-accent, #3b82f6); color: #fff; }
.woa-ui-schwebend { position: fixed; right: 12px; bottom: 12px; z-index: 1900; background: var(--woa-surface, #1a1d24); border: 1px solid var(--woa-border, #2d323d);
  border-radius: 2rem; box-shadow: 0 4px 16px rgba(0,0,0,.25); opacity: .85; }
.woa-ui-schwebend:hover, .woa-ui-schwebend.offen { opacity: 1; }
.woa-ui-schwebend .woa-ui-menue { left: auto; right: 0; }
@media print { .woa-ui { display: none !important; } }

/* Bootstrap-Signalfarben sind fuer Text auf hellem Grund zu hell (gelb/cyan) -> lesbare Toene */
[data-bs-theme="light"] .text-warning { color: #8a5a00 !important; }
[data-bs-theme="light"] .text-info { color: #0b6b85 !important; }
[data-bs-theme="light"] .text-success { color: #17643c !important; }
[data-bs-theme="light"] .text-danger { color: #b02a37 !important; }
[data-bs-theme="light"] .text-primary { color: #0a58ca !important; }
[data-bs-theme="light"] .link-info { color: #0b6b85 !important; }
[data-bs-theme="light"] .link-warning { color: #8a5a00 !important; }
[data-bs-theme="light"] .btn-outline-warning { --bs-btn-color: #8a5a00; --bs-btn-border-color: #d39e00; --bs-btn-hover-color: #1f2528; }
[data-bs-theme="light"] .btn-outline-info { --bs-btn-color: #0b6b85; --bs-btn-border-color: #3fb6d3; --bs-btn-hover-color: #1f2528; }
[data-bs-theme="light"] .btn-outline-success { --bs-btn-color: #17643c; }
[data-bs-theme="light"] .btn-outline-primary { --bs-btn-color: #0a58ca; }
[data-bs-theme="light"] .btn-outline-danger { --bs-btn-color: #b02a37; }
[data-bs-theme="light"] .btn-outline-secondary { --bs-btn-color: #4e565c; --bs-btn-border-color: #9aa2a8; }
/* farbige Flaechen behalten ihre (dunkle/helle) Schrift */
[data-bs-theme="light"] .bg-warning .text-muted, [data-bs-theme="light"] .bg-info .text-muted,
[data-bs-theme="light"] .bg-primary .text-muted, [data-bs-theme="light"] .bg-success .text-muted,
[data-bs-theme="light"] .bg-danger .text-muted, [data-bs-theme="light"] .bg-secondary .text-muted { color: inherit !important; opacity: .8; }
[data-bs-theme="light"] .bg-warning .text-warning, [data-bs-theme="light"] .bg-info .text-info { color: inherit !important; }
[data-bs-theme="light"] .badge.bg-light { color: #1f2528; }
[data-bs-theme="light"] .badge.bg-light.text-warning { background-color: #fff3cd !important; }
[data-bs-theme="light"] .bg-secondary .text-primary, [data-bs-theme="light"] .bg-secondary [class*="text-"] { color: #fff !important; }
[data-bs-theme="light"] .list-group-item.active .text-muted, [data-bs-theme="light"] .dropdown-item.active .text-muted { color: rgba(255,255,255,.8) !important; }
[data-bs-theme="light"] .num[class*="bg-"] { color: #fff; }
[data-bs-theme="light"] .num.bg-warning, [data-bs-theme="light"] .num.bg-info, [data-bs-theme="light"] .num.bg-light { color: #1f2528; }

/* FullCalendar (Terminplaner, Wiedervorlage) */
[data-bs-theme="light"] .fc { --fc-button-text-color: #1f2528; --fc-button-hover-border-color: #9aa2a8; }
[data-bs-theme="light"] .fc .fc-button-primary.fc-button-active,
[data-bs-theme="light"] .fc .fc-button-primary:not(:disabled):active { color: #fff; }
[data-bs-theme="light"] .op-days-warn { color: #8a5a00 !important; }
[data-bs-theme="light"] .progress-bar.bg-info { color: #1f2528; }
[data-bs-theme="light"] .badge.bg-secondary.bg-opacity-50 { color: #1f2528 !important; }
/* Sidebar-Fuss: Platz fuer den Umschalter (sonst waagerechter Scrollbalken) */
#sidebar .nav-item.mt-auto .d-lg-flex .btn { padding-left: .3rem !important; padding-right: .3rem !important; }
#sidebar .d-lg-flex [data-woa-umschalter] .woa-ui-knopf { padding: .25rem; }
#sidebar .d-lg-flex [data-woa-umschalter] .woa-ui-sp { display: none; }
