@media screen, print {


/* Das Fenster aller Masken (js/bi/crf/qv-window.js) -- seit 09_075 die gemeinsame Dialog-Huelle.

   Die Bausteine (Kontur, Kopf, Plaketten, Punkt, Icon-Knoepfe, Rumpf, Fensterleiste, Tokens) kommen
   aus css/bi/dlg/dlg.css (`.dlg`, `.dlg__hd`, `.wbar` …); hier steht nur, was DIESES Fenster
   darueber hinaus braucht: den Kopf als Zeile (links Gattung/Titel/Brotkrume, rechts Plaketten und
   Knoepfe), das Scroll-Modell der Fragmente mit Reitern (`data-dlg-flush`), den Rueckfall fuer
   Fragmente ohne Vertrag (`.qvw-legacy`, bis P3-P8 umgestellt), die Fensterleiste auf der Seite
   und die Optik der Autoren-API-Dialoge (crf-api.js leiht `.qvw-confirm-*`).

   Arbeitsfenster OHNE Overlay (09_075b §1.1): `#qvwOverlay` ist nur noch ein Traeger ohne Flaeche.
   KEIN `transform` und kein `filter` an der Fensterwurzel - beides machte sie zum umgebenden Block
   fuer `position: fixed`-Kinder (die Dialoge der Masken liegen IM Fragment, z 10000).
   Ebenen (z-Leiter in dlg.css): Leiste 8900 < Fenster 9000 < Dialoge der Maske 10000 <
   blockierender Dialog 11000. */

.qvw-overlay {
  display: none;
}
.qvw-overlay.qvw-open {
  display: block;
}

/* Position setzt das Skript (left/top in Pixeln: mittig, gemerkt, gezogen). */
.qvw-window.dlg {
  margin: 0;
  -webkit-animation: dlg-fade .12s ease-out;
  animation: dlg-fade .12s ease-out;
}
.qvw-window.dlg:focus {
  outline: none;
}

/* `hidden` schlaegt die display-Regeln der Bausteine (`.dlg__ib` inline-flex, `.dlg__dot` …). */
.qvw-window [hidden],
.qvw-bar [hidden] {
  display: none !important;
}


/* ---------------------------------------------------------------------------------------------
   Kopf: EIN Kopf, aus dem Fragment-Vertrag (data-dlg-*) gezeichnet. Als Zeile, damit lange Titel
   und Brotkrumen nie unter die Knoepfe laufen.
   --------------------------------------------------------------------------------------------- */
.qvw-window .qvw-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.qvw-window.is-max .qvw-head {
  cursor: default;
}
.qvw-head__main {
  flex: 1 1 auto;
  min-width: 0;
}
.qvw-window .qvw-head .dlg__tr {
  position: static;
  flex: none;
  margin: -2px -4px 0 0;
}
.qvw-head__title {
  min-width: 0;
}
.qvw-head__title .qvw-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qvw-head__title .dlg__id {
  flex: none;
}
.qvw-head__crumb {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qvw-head__badges,
.qvw-head__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.qvw-head__badges:empty,
.qvw-head__action:empty {
  display: none;
}
.qvw-window .dlg__ib[disabled] {
  cursor: not-allowed;
  opacity: .45;
}

/* Fragment mit Reitern (`data-dlg-flush`): der Kopf traegt keine Linie - Kopf und Reiterleiste
   bilden EINE Kopfzone, nur die Reiterleiste traegt die 1-px-Linie (Plan §5.2). */
.qvw-window .qvw-head--flush {
  border-bottom: 0;
  padding-bottom: 6px;
}

/* Fragment ohne Vertrag (Rueckfall): neutrale Linie - die Maske zeichnet (noch) ihren eigenen
   Kopf mit Akzent darunter. */
.qvw-window .qvw-head--legacy {
  border-bottom: 1px solid #DCE2E8;
}


/* ---------------------------------------------------------------------------------------------
   Fenstergroesse (E28, Rueckmeldung der Browser-Abnahme 2026-09-24): WIE VOR 09_075 -- die festen
   Breiten je Maske (§6 des Auftrags) sind entfallen. Standard: 95vw, hoechstens 1400 px, feste
   Hoehe 90vh (der Rumpf rollt). `.qvw-narrow` (`data-dlg-width="narrow"`, alter Code `n`):
   hoechstens 1000 px. `.qvw-content` (`data-dlg-height="content"`, alter Code `c`): Inhaltshoehe,
   hoechstens 80vh -- oben bei 10vh setzt das Skript (qvwCenter()). `.is-fill`
   (`data-dlg-height="fill"`): das Standardfenster, in dem statt des Rumpfs ein innerer Bereich rollt
   (Code, Rechte-Liste, Query-Verlauf; `.dlg.is-fill .dlg__bd` in dlg.css). Die Struktur-Masken
   schalten Breite und Hoehe je Reiter (crfDesignTabs(), showTab() in crf-design.js).
   `.dlg` (dlg.css) gibt 720 px und min(86vh, 820px) vor -- hier ueberschrieben, drei Klassen.
   --------------------------------------------------------------------------------------------- */
.qvw-window.dlg {
  width: 95vw;
  max-width: 1400px;
  height: 90vh;
  max-height: 90vh;
}
.qvw-window.dlg.qvw-narrow {
  max-width: 1000px;
}
.qvw-window.dlg.qvw-content {
  height: auto;
  max-height: 80vh;
}
.qvw-window.dlg.is-fill {
  height: 90vh;
}

/* Maximiert (Doppelklick auf den Kopf): volle Hoehe, die Breite bleibt. Steht nach den Hoehen,
   weil sie gleich schwer wiegen. */
.qvw-window.dlg.is-max {
  height: calc(100vh - 32px);
  max-height: calc(100vh - 32px);
}

.qvw-window .qvw-body {
  background: #FFFFFF;
}

/* Browser-Abnahme 2026-09-25: das Notizfenster ist 75vh hoch (statt 90vh), schmal kommt aus dem
   Vertrag (`data-dlg-width="narrow"`). Nur ab 900 px -- darunter gilt das Vollbild; maximiert gilt
   `.is-max`. */
@media (min-width: 900px) {
  .qvw-window.dlg:not(.is-max):has(.qvw-body > .note-mask) {
    height: 75vh;
    max-height: 75vh;
  }
}

/* Fragmente mit Reitern (`data-dlg-flush`): die Wurzel fuellt den Rumpf mindestens ganz, damit die
   Fussleiste an der Unterkante haengt, auch wenn der Inhalt des Reiters kuerzer ist als das feste
   Fenster (wie Browser-Rueckmeldung 39 der Struktur-Masken). */
.qvw-window .qvw-body--flush {
  display: flex;
  flex-direction: column;
}
.qvw-window .qvw-body--flush > [data-dlg-kind] {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}
.qvw-window .qvw-body--flush > [data-dlg-kind] > .dlg__ft {
  margin-top: auto;
}

/* `fill`: der Rumpf rollt nicht, die Wurzel ist so hoch wie er, der innere Bereich rollt. */
.qvw-window.is-fill .qvw-body > :first-child {
  flex: 1 1 auto;
  min-height: 0;
}

/* Sticky statt Verschieben: Reiter und Fuss bleiben IN der Maskenwurzel (die Delegation der Masken
   haengt daran), kleben aber oben bzw. unten im rollenden Rumpf. Die negativen Raender des
   Design-Fusses gehen hier auf 0 - der Rumpf hat kein Polster mehr, das sie ausgleichen muessten. */
.qvw-body--flush .dlg__tabs,
.qvw-body--flush [role="tablist"] {
  position: sticky;
  top: 0;
  z-index: 3;
  margin-top: 0;
  padding: 0 18px;
  background: #FFFFFF;
  border-bottom: 1px solid #DCE2E8;
}
.qvw-body--flush .dlg__ft,
.qvw-body--flush .design__footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-left: 0;
  margin-right: 0;
}

/* Ladeanzeige und Fehlermeldung sind eine Zeile Text; 120 px geben ihr einen Kasten. */
.qvw-loading,
.qvw-error {
  box-sizing: border-box;
  min-height: 120px;
  padding: 28px 16px;
  font-size: 13px;
  text-align: center;
}
.qvw-loading {
  color: #5F6A76;
}
.qvw-error {
  color: #B03A2E;
}


/* Fragmente OHNE Vertrag (Klasse `.qvw-legacy`): dieselben Groessen ueber `data-qv-width` und
   `data-qv-height` -- keine eigene Regel mehr noetig. */


/* ---------------------------------------------------------------------------------------------
   Fensterleiste auf der Seite (09_075b §8): solange sie steht, bekommt die Seite unten Platz,
   die feste Aktionsleiste des eCRF rueckt ueber sie, der Datepicker liegt darueber (jQuery UI
   setzt ihn inline auf 1001, sonst verdeckt die Leiste ihn am unteren Rand) - z-Leiter dlg.css.
   Review m17: keine Regel fuer Select2 -- dessen Stylesheet (3.x) setzt `.select2-drop` schon auf
   9999 und die Maske auf 9998; eine Regel hier SENKTE beide nur.
   --------------------------------------------------------------------------------------------- */
body.has-wbar {
  padding-bottom: 56px;
}
body.has-wbar .bottomlayer {
  bottom: 56px;
}
body.has-wbar .ui-datepicker,
body.has-wbar #ui-datepicker-div {
  z-index: 8950 !important;
}

/* Der Chip: Streifen + Oeffnen-Knopf (Gattung, Gegenstand, Punkt) + ✕. Eigener Reset, weil
   css/bi/field.css nackte `button` beschreibt. */
.wbar .wchip {
  cursor: default;
}
.wbar .wchip__open {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-sizing: border-box;
  width: auto;
  height: 100%;
  margin: 0;
  padding: 0 4px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.wbar .wchip__open:focus {
  outline-offset: -2px;
}


/* ---------------------------------------------------------------------------------------------
   Autoren-API-Dialoge (09_047, js/bi/crf/crf-api.js): alert/confirm/prompt leihen diese Optik
   (`qvw-confirm-overlay crf-api-dialog`). Seit 09_075 in den Tokens der Huelle (Primaer #0E5F6B,
   destruktiv #B03A2E, Fokus #14707F); die Umstellung auf dlgBlock folgt mit B10 (P2).
   --------------------------------------------------------------------------------------------- */
.qvw-confirm-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10500;
  background: rgba(23, 43, 63, .32);
}
.qvw-confirm-overlay.qvw-confirm-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.qvw-confirm {
  box-sizing: border-box;
  width: 480px;
  width: min(480px, 92vw);
  max-width: 92vw;
  overflow: hidden;
  border: 1px solid #D6DEE5;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 18px 44px rgba(23, 43, 63, .24);
  color: #2C3A47;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.qvw-confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
  color: #1F2933;
  font-size: 16px;
  font-weight: 700;
}

.qvw-confirm-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Eigener Reset: css/bi/field.css beschreibt button pauschal (Rand, 14px/32px, margin-left 2px). */
.qvw-confirm-close {
  flex: none;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  margin: 0 0 0 12px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5F6A76;
  cursor: pointer;
  font: inherit;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
}
.qvw-confirm-close:hover,
.qvw-confirm-close:focus {
  background: #EEF3F7;
  color: #1F2933;
}

.qvw-confirm-body {
  padding: 10px 18px 16px;
  font-size: 13px;
  line-height: 1.45;
}
.qvw-confirm-body p {
  margin: 0;
  word-break: break-word;
}

.qvw-confirm-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 11px 18px;
  border-top: 1px solid #E8EBEE;
  background: #FBFCFD;
}

.qvw-confirm-btn {
  box-sizing: border-box;
  height: 30px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid #7C8894;
  border-radius: 6px;
  background: #FFFFFF;
  color: #2C3A47;
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
}
.qvw-confirm-btn:hover {
  background: #EEF3F7;
  border-color: #4C5A67;
}
.qvw-confirm-btn:focus {
  outline: 2px solid #14707F;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(20, 112, 127, .18);
}

.qvw-confirm-ok {
  border-color: #0E5F6B;
  background: #0E5F6B;
  color: #FFFFFF;
}
.qvw-confirm-ok:hover {
  border-color: #0B4F59;
  background: #0B4F59;
}

/* Der Knopf, der etwas vernichtet - Löschen, Verwerfen -, trägt Rot. */
.qvw-confirm-ok--danger {
  border-color: #B03A2E;
  background: #B03A2E;
}
.qvw-confirm-ok--danger:hover {
  border-color: #8E2C22;
  background: #8E2C22;
}

/* 09_047: die Dialoge der Autoren-API (alert/confirm/prompt). Nur `alert` traegt eine Farbe in der
   Kopfzeile; error/warn/info sind keine Dialoge, sondern Einblendungen (jGrowl). */
.crf-api-dialog .qvw-confirm--info .qvw-confirm-head { color: #1B4676; }
.crf-api-dialog .qvw-confirm-body p { white-space: pre-line; }
.crf-api-dialog .qvw-confirm-input {
  display: none;
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  margin: 10px 0 0;
  padding: 0 9px;
  border: 1px solid #7C8894;
  border-radius: 6px;
  font: inherit;
  font-size: 13px;
}
.crf-api-dialog .qvw-confirm--prompt .qvw-confirm-input { display: block; }
.crf-api-dialog .qvw-confirm--alert .qvw-confirm-cancel { display: none; }


}


/* Schmale Bildschirme: das Fenster nimmt alles, ein Rahmen um 20 px Rest lohnt nicht. `!important`
   an left/top, weil das Skript die Position inline setzt. Nicht in den Block oben geschachtelt. */
@media screen and (max-width: 899px) {

.qvw-window.dlg,
.qvw-window.dlg.qvw-narrow,
.qvw-window.dlg.qvw-content,
.qvw-window.dlg.is-fill {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0;
}

}


/* Keine Ein-/Ausblendung, keine Bewegung (09_075b §10). */
@media (prefers-reduced-motion: reduce) {

.qvw-window.dlg,
.qvw-confirm-overlay,
.wbar {
  -webkit-animation: none !important;
  animation: none !important;
  -webkit-transition: none !important;
  transition: none !important;
}

}
