/* Letzte Cleaning Prüfung: 12.10.2026 | Letztes Cleaning: 12.10.2026 */

/* Inter der Studios (dieselbe Datei wie contentfactory-marketing-studio.css), damit die Leiste die Schrift des Movie Studios trägt. */
@font-face {
  font-family: "MS Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../fonts/cinema-studio/inter-latin-wght-normal.woff2") format("woff2");
}
/*
 * confacAI-Hauptseite im Aussehen des Movie Studios (Arbeitsliste 12.10.2026):
 *   WL-22/WL-26  linke Leiste wie die Movie-Studio-Leiste (auf- und eingeklappt)
 *   WL-30        obere Leiste so hoch wie im Movie Studio (68 px)
 *   WL-23        abgerundeter Rahmen um den Arbeitsbereich (4 px Abstand, 1 px #252936, Rundung 16)
 *   WL-31        überall Text 24 px vom Rahmen, Kachelraster 4 px (contentfactory-ergebnis-mauer.css)
 *   WL-26        Nachprüfung: Schrift der Leiste ist Inter wie im Movie Studio (vorher DM Sans, übersehen);
 *                kein Leistenschatten
 *
 * Alle Maße sind aus der gerenderten Movie-Studio-Seite gelesen (contentfactory-marketing-studio.css
 * plus werbestudio.css), nicht geschätzt: Leiste 231 px (+4 px Rand), eingeklappt 50 px, Kopf der
 * Leiste 48 px mit Einklapp-Knopf 28 × 28, Rubriktitel 15/600 #c9cbd1, Einträge 36 px hoch, Rundung 8,
 * Text 14/500, Symbole 18 px #ff3656, aktiv #181b24 mit 2-px-Strich #ff304f, Trennlinie #262a35.
 *
 * Inhalte der Leiste (Rubriken, Werkzeuge, Symbole, Zahlen) bleiben unverändert. Nur PC und Tablet;
 * das Handy-Menü (bis 700 px) behält seine eigenen Regeln. Die Datei wird zuletzt geladen; die
 * doppelte Klasse bzw. html body schlägt die älteren !important-Regeln der Leiste.
 */
@media (min-width: 701px) {
  :root { --sidebar: 235px; --sidebar-collapsed: 54px; }

  /* --- Leiste -------------------------------------------------------------------------------- */
  html body .factory-sidebar {
    width: var(--sidebar) !important;
    padding: 0 0 8px !important;
    background: #0b0c11 !important;
    border-right: 0 !important;
    /* Wie im Movie Studio: Inter statt DM Sans, kein Schatten zum Inhalt (WL-26, Nachprüfung 12.10.2026). */
    font-family: "MS Inter", Inter, ui-sans-serif, system-ui, sans-serif !important;
    box-shadow: none !important;
  }
  html body .factory-main { margin-left: var(--sidebar) !important; }
  html body.factory-sidebar-collapsed .factory-sidebar { width: var(--sidebar-collapsed) !important; padding: 0 0 8px !important; overflow: visible; }
  html body.factory-sidebar-collapsed .factory-main { margin-left: var(--sidebar-collapsed) !important; }

  /* Logo im 68-px-Band auf Höhe der Kopfzeile, links wie im Movie Studio (x = 22). */
  html body .factory-sidebar .factory-brand {
    flex: 0 0 68px !important;
    height: 68px !important;
    padding: 0 0 0 22px !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }
  /* Eingeklappt bleibt das volle Logo stehen wie im Movie Studio (dort sitzt es in der Kopfzeile und ragt über die schmale Leiste). */
  html body.factory-sidebar-collapsed .factory-sidebar .factory-brand {
    position: relative;
    z-index: 5;
    width: auto !important;
    height: 68px !important;
    padding: 0 0 0 22px !important;
    justify-content: flex-start !important;
    overflow: visible !important;
  }
  html body.factory-sidebar-collapsed .factory-sidebar .factory-brand-wordmark {
    display: block !important;
    width: 156px !important;
    height: auto !important;
    visibility: visible !important;
  }
  /* Linie rechts an der Leiste: 1 px #1c202a, beginnt unter der Kopfzeile (Movie Studio: .ms-leiste border-right). */
  html body .factory-sidebar::after { content: ""; position: absolute; top: 72px; bottom: 0; right: 0; width: 1px; background: #1c202a; pointer-events: none; }

  /* Einklapp-Knopf: rechts oben in der Leiste unter dem Logo (Movie Studio: 28 × 28, 9 px vom Rand). */
  html body .factory-sidebar .factory-sidebar-toggle {
    position: absolute !important;
    top: 78px !important;
    right: 9px !important;
    left: auto !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #828282 !important;
    transform: none !important;
    z-index: 3;
  }
  html body .factory-sidebar .factory-sidebar-toggle:hover { background: rgba(255, 255, 255, .05) !important; color: #fff !important; }
  html body .factory-sidebar .factory-sidebar-toggle > i { display: none !important; }
  html body .factory-sidebar .factory-sidebar-toggle > svg { display: block; width: 16px; height: 16px; }
  html body.factory-sidebar-collapsed .factory-sidebar .factory-sidebar-toggle {
    right: auto !important;
    left: 9px !important;
    top: 74px !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, .05) !important;
    color: #828282 !important;
  }

  /* Hauptnavigation (Studio, Creator-Profil, Upgrade): Abstand für die Knopfzeile (48 px). */
  html body .factory-sidebar .factory-nav {
    margin: 48px 0 0 !important;
    padding: 0 8px 16px !important;
    position: relative;
    gap: 2px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  html body .factory-sidebar .factory-nav::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 1px; background: #262a35; }
  html body .factory-sidebar :is(.factory-nav a, .factory-sidebar-control, .factory-sidebar-tool) {
    height: 36px !important;
    min-height: 36px !important;
    margin: 0 !important;
    padding: 6px !important;
    gap: 8px !important;
    display: flex !important;
    align-items: center !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    font-family: "MS Inter", Inter, ui-sans-serif, system-ui, sans-serif !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: .1px !important;
    line-height: 20px !important;
  }
  /* Der Text steht in einem Span, den andere Regeln auf 13,2 px setzten; im Movie Studio sind es 14 px. */
  html body .factory-sidebar :is(.factory-nav a, .factory-sidebar-control, .factory-sidebar-tool) > span:not([class*="badge"]):not([class*="count"]) { font-size: 14px !important; }
  html body .factory-sidebar :is(.factory-nav a:not([data-factory-upgrade]), .factory-sidebar-control, .factory-sidebar-tool) { color: #8d92a2 !important; }
  html body .factory-sidebar :is(.factory-nav a, .factory-sidebar-control, .factory-sidebar-tool):hover { background: #181b24 !important; }
  html body .factory-sidebar :is(.factory-nav a:not([data-factory-upgrade]), .factory-sidebar-control, .factory-sidebar-tool):hover { color: #fff !important; }
  html body .factory-sidebar :is(.factory-nav a.active, .factory-sidebar-control.active, .factory-sidebar-tool.active) {
    background: #181b24 !important;
    box-shadow: inset 2px 0 #ff304f !important;
    color: #fff !important;
  }
  html body .factory-sidebar :is(.factory-nav a, .factory-sidebar-control, .factory-sidebar-tool) > :is(i, svg) {
    flex: 0 0 24px !important;
    width: 24px !important;
    margin: 0 !important;
    color: #ff3656 !important;
    font-size: 18px !important;
    line-height: 24px !important;
    text-align: center;
  }
  html body .factory-sidebar :is(.factory-nav a, .factory-sidebar-control, .factory-sidebar-tool) > svg { height: 18px !important; }

  /* Rubriken: „KI-Werkzeuge“ und die Gruppen wie „Erstellen“/„Elemente“ im Movie Studio. */
  html body .factory-sidebar .factory-sidebar-tools { padding: 0 8px 12px !important; margin: 0 !important; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; mask-image: linear-gradient(180deg, transparent, #000 12px, #000 calc(100% - 12px), transparent); }
  html body .factory-sidebar .factory-sidebar-tools::-webkit-scrollbar { display: none; }
  /* Überschrift und Gruppen scrollen gemeinsam; keine feststehende Überschrift über halben Einträgen. */
  html body .factory-sidebar .factory-sidebar-tool-list { flex: 0 0 auto; overflow: visible; }
  /* Rollbalken der Werkzeugliste unsichtbar wie im Movie Studio (.ms-leiste-rollen); gerollt wird weiter. */
  html body .factory-sidebar .factory-sidebar-tool-list { scrollbar-width: none !important; -ms-overflow-style: none; }
  html body .factory-sidebar .factory-sidebar-tool-list::-webkit-scrollbar { display: none !important; width: 0 !important; }
  html body .factory-sidebar :is(.factory-sidebar-tools-head, .factory-sidebar-control-group h3, .factory-sidebar-tool-group h3) {
    height: 32px !important;
    margin: 0 !important;
    padding: 0 6px !important;
    display: flex !important;
    align-items: center !important;
    color: #c9cbd1 !important;
    font-family: "MS Inter", Inter, ui-sans-serif, system-ui, sans-serif !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: .2px !important;
    line-height: 20px !important;
    text-transform: none !important;
  }
  /* Trennlinie über jeder Rubrik (Movie Studio: 1 px #262a35, 8 px eingerückt, 12 px Abstand, 16 px Luft). */
  html body .factory-sidebar.factory-sidebar :is(.factory-sidebar-tools-head, .factory-sidebar-control-group, .factory-sidebar-tool-group) {
    position: relative;
    margin-top: 12px !important;
    padding-top: 16px !important;
    border-top: 0 !important;
  }
  /* „KI-Werkzeuge 15“ als oberste Rubrik; die erste Gruppe darunter braucht keine zweite Linie. */
  html body .factory-sidebar.factory-sidebar .factory-sidebar-tools-head { height: auto !important; min-height: 44px !important; margin-top: 0 !important; flex: 0 0 auto !important; padding: 12px 6px 12px !important; justify-content: space-between !important; }
  html body .factory-sidebar.factory-sidebar .factory-sidebar-tools-head::before { display: none; }
  html body .factory-sidebar.factory-sidebar .factory-sidebar-tool-list > :first-child { margin-top: 0 !important; padding-top: 0 !important; }
  html body .factory-sidebar.factory-sidebar .factory-sidebar-tool-list > :first-child::before { display: none; }
  html body .factory-sidebar.factory-sidebar :is(.factory-sidebar-tools-head, .factory-sidebar-control-group, .factory-sidebar-tool-group)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 2px;
    right: 2px;
    height: 1px;
    background: #262a35;
  }
  html body .factory-sidebar :is(.factory-sidebar-control-group, .factory-sidebar-tool-group) { display: flex !important; flex-direction: column !important; gap: 2px !important; }

  /* Eingeklappt: nur Symbole, mittig in der schmalen Leiste (Einträge 34 × 36 wie im Movie Studio). */
  html body.factory-sidebar-collapsed .factory-sidebar :is(.factory-sidebar-tools-head, .factory-sidebar-control-group h3, .factory-sidebar-tool-group h3) { height: 0 !important; padding: 0 !important; overflow: hidden !important; font-size: 0 !important; }
  html body.factory-sidebar-collapsed .factory-sidebar .factory-sidebar-tools-head { height: 1px !important; min-height: 0 !important; }
  html body.factory-sidebar-collapsed .factory-sidebar :is(.factory-nav, .factory-sidebar-tools) { padding: 0 10px !important; }
  html body.factory-sidebar-collapsed .factory-sidebar :is(.factory-nav a, .factory-sidebar-control, .factory-sidebar-tool) {
    width: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    justify-content: center !important;
  }
  /* Der Laufzähler (factory-sidebar-tool-running) bleibt sichtbar, sonst sieht man eingeklappt nicht, dass etwas läuft (14.10.2026). */
  html body.factory-sidebar-collapsed .factory-sidebar :is(.factory-nav a, .factory-sidebar-control, .factory-sidebar-tool) > :not(i):not(svg):not(.factory-sidebar-tool-running) { display: none !important; }
  /* In der 34 px breiten Leiste schnitt der Bereich (overflow: hidden) den Zähler rechts ab: als Abzeichen oben rechts am Symbol. */
  html body.factory-sidebar-collapsed .factory-sidebar :is(.factory-sidebar-control, .factory-sidebar-tool) > .factory-sidebar-tool-running { top: 0 !important; left: calc(50% + 4px) !important; transform: none !important; }
  html body.factory-sidebar-collapsed .factory-sidebar.factory-sidebar :is(.factory-sidebar-control-group, .factory-sidebar-tool-group) { margin-top: 8px !important; padding-top: 8px !important; }
  html body.factory-sidebar-collapsed .factory-sidebar.factory-sidebar .factory-sidebar-tools-head { height: 1px !important; padding: 0 !important; margin-top: 8px !important; }

  /* --- Kopfzeile (WL-30): 68 px wie im Movie Studio, ohne eigene Trennlinie -------------------- */
  html body .factory-topbar {
    height: 68px !important;
    min-height: 68px !important;
    padding: 0 24px !important;
    border-bottom: 0 !important;
    background: #0b0c11 !important;
  }

  /* --- Rahmen (WL-23): Arbeitsbereich in einer abgerundeten Fläche ----------------------------- */
  html body .factory-main { background: #0b0c11; }
  html body .factory-main > .factory-content {
    margin: 4px 4px 4px !important;
    min-height: calc(100vh - 76px);
    border: 1px solid #252936 !important;
    border-radius: 16px !important;
    background-color: #0b0c11;
    overflow: clip;
    box-sizing: border-box;
  }

  /* Werkzeugseiten: der Arbeitsbereich ist fest positioniert und lag unter der alten 76-px-Kopfzeile. */
  html body #factory-workspace.open {
    top: 72px !important;
    left: calc(var(--sidebar) + 4px) !important;
    right: 4px !important;
    bottom: 4px !important;
    border: 1px solid #252936 !important;
    border-radius: 16px !important;
    background: #0b0c11 !important;
    overflow: hidden !important;
  }
  html body.factory-sidebar-collapsed #factory-workspace.open { left: calc(var(--sidebar-collapsed) + 4px) !important; }
  html body #factory-workspace.open .workspace-panel { background: #0b0c11 !important; }

  /* --- Seitenrand (WL-31): Text 24 px vom Rahmen ---------------------------------------------- */
  html body .factory-main > .factory-content { max-width: none !important; padding: 0 24px !important; }
  html body.factory-page-active .workspace-header { padding-left: 24px !important; padding-right: 24px !important; }
  html body.factory-page-active #workspace-body#workspace-body { padding-left: 24px !important; padding-right: 24px !important; }
}

@media (min-width: 701px) {
  /* Alte Linie unter der Hauptnavigation über die volle Breite entfällt; die Rubrik-Linie
     über „KI-Werkzeuge“ (eingerückt wie im Movie Studio) trennt. */
  html body .factory-sidebar.factory-sidebar .factory-nav { border-bottom: 0 !important; }
  html body .factory-sidebar.factory-sidebar .factory-sidebar-tool-list > :first-child { padding-top: 6px !important; }
}
@media (min-width: 701px) {
  /* Eingeklappt: Werkzeug-Symbole genau mittig wie die Hauptnavigation (WL-22). */
  html body.factory-sidebar-collapsed .factory-sidebar.factory-sidebar :is(.factory-nav, .factory-sidebar-control-group, .factory-sidebar-tool-group, .factory-sidebar-tool-list) {
    align-items: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  html body.factory-sidebar-collapsed .factory-sidebar.factory-sidebar .factory-sidebar-tools { padding: 0 !important; }
  /* Die Liste hatte eine feste Breite von 66 px aus älteren Regeln und schob die Symbole nach rechts. */
  html body.factory-sidebar-collapsed .factory-sidebar.factory-sidebar .factory-sidebar-tool-list { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
}

/* Upgrade deckt die gesamte Anwendung ab; der normale Inhaltsrahmen ist kein Dialogrand. */
html body:is(.factory-upgrade-focus,.factory-credit-focus) #factory-workspace.open { inset: 0 !important; width: 100vw !important; height: 100% !important; max-width: none !important; max-height: none !important; border: 0 !important; border-radius: 0 !important; margin: 0 !important; }
