/*
 * CoJoBo: App-Umschalter fuer osTicket (include/cojobo-umschalter.inc.php).
 * Beim Bau von einbauen.php VOR cojobo-portal.css und cojobo-agenten.css
 * gesetzt (eine Quelle, kein eigener Abruf). Farben und Masse wie im
 * Network Visualizer (top-nav.component.css: .waffel, .tafel, .umschalter).
 */

:root {
  --cojobo-umschalter-text: #1c1e21;
  --cojobo-umschalter-leise: #606770;
  --cojobo-umschalter-royalblau: #0e2882;
  --cojobo-umschalter-blau-hell: #e8ebf5;
  --cojobo-umschalter-ringblau: #94aeff;
  --cojobo-umschalter-schrift: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif;
}

.cojobo-umschalter__knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
  cursor: pointer;
}

.cojobo-umschalter__knopf:hover,
.cojobo-umschalter__knopf[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.12);
}

.cojobo-umschalter__knopf:focus-visible {
  outline: 2px solid var(--cojobo-umschalter-ringblau);
  outline-offset: 2px;
}

.cojobo-umschalter {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.cojobo-umschalter__tafel {
  position: absolute;
  z-index: 2000;
  top: calc(100% + 14px);
  left: -2px;
  width: min(360px, calc(100vw - 16px));
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 12px;
  box-sizing: border-box;
  color: var(--cojobo-umschalter-text);
  text-align: left;
  font: 14px/1.4 var(--cojobo-umschalter-schrift);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.cojobo-umschalter__tafel[hidden] {
  display: none;
}

/* Die Tafel steht im Agentenbereich in #header: osTicket gestaltet dort
   jedes <p> (Kasten, mittig) und jeden Link (orange), daher mit ID. */
#cojobo-umschalter .cojobo-umschalter__titel {
  display: block;
  max-width: none;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  margin: 4px 8px 8px;
  color: var(--cojobo-umschalter-leise);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#cojobo-umschalter ul + .cojobo-umschalter__titel {
  margin-top: 14px;
}

.cojobo-umschalter__tafel ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#cojobo-umschalter.cojobo-umschalter__tafel a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 8px;
  box-sizing: border-box;
  color: var(--cojobo-umschalter-text);
  border-radius: 10px;
  text-decoration: none;
}

#cojobo-umschalter.cojobo-umschalter__tafel a:hover,
#cojobo-umschalter.cojobo-umschalter__tafel a.ist-aktuell {
  color: var(--cojobo-umschalter-text);
  background: var(--cojobo-umschalter-blau-hell);
  text-decoration: none;
}

.cojobo-umschalter__symbol {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--cojobo-umschalter-royalblau);
  background: var(--cojobo-umschalter-blau-hell);
  border-radius: 10px;
}

.ist-aktuell .cojobo-umschalter__symbol {
  color: #fff;
  background: var(--cojobo-umschalter-royalblau);
}

.cojobo-umschalter__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cojobo-umschalter__text small {
  color: var(--cojobo-umschalter-leise);
  font-size: 13px;
}

/* Zwei Apps in einer Zeile (OneDrive | WebFTP), als EIN Block: links
   linksbuendig, rechts rechtsbuendig, dazwischen eine schraege Naht, die nur
   aus zwei leicht verschiedenen Blautoenen entsteht - Trenner und Verbinder
   zugleich (Betreiber 23.11.2026). Beide Haelften ragen 12 px ueber die
   Mitte und werden schraeg beschnitten; jede reagiert fuer sich auf Hover. */
.cojobo-umschalter__paar {
  --cojobo-paar-schraege: 24px;
  --cojobo-paar-links: #eef1f9;
  --cojobo-paar-links-hover: #e3e8f5;
  --cojobo-paar-rechts: #e2e7f4;
  --cojobo-paar-rechts-hover: #d6ddf0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 4px 0;
  border-radius: 10px;
  overflow: hidden;
}

#cojobo-umschalter.cojobo-umschalter__tafel .cojobo-umschalter__paar a {
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 60px;
  border-radius: 0;
}

#cojobo-umschalter.cojobo-umschalter__tafel .cojobo-umschalter__paar a:first-child {
  margin-right: calc(var(--cojobo-paar-schraege) / -2);
  padding-right: calc(var(--cojobo-paar-schraege) + 6px);
  background: var(--cojobo-paar-links);
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--cojobo-paar-schraege)) 100%, 0 100%);
}

#cojobo-umschalter.cojobo-umschalter__tafel .cojobo-umschalter__paar a:last-child {
  flex-direction: row-reverse;
  margin-left: calc(var(--cojobo-paar-schraege) / -2);
  padding-left: calc(var(--cojobo-paar-schraege) + 6px);
  text-align: right;
  background: var(--cojobo-paar-rechts);
  clip-path: polygon(var(--cojobo-paar-schraege) 0, 100% 0, 100% 100%, 0 100%);
}

#cojobo-umschalter.cojobo-umschalter__tafel .cojobo-umschalter__paar a:first-child:hover {
  background: var(--cojobo-paar-links-hover);
}

#cojobo-umschalter.cojobo-umschalter__tafel .cojobo-umschalter__paar a:last-child:hover {
  background: var(--cojobo-paar-rechts-hover);
}

/* Symbole auf getoenter Flaeche: weiss hinterlegt, sonst verschwinden sie */
.cojobo-umschalter__paar .cojobo-umschalter__symbol {
  background: #fff;
}

.cojobo-umschalter__paar .cojobo-umschalter__text small {
  font-size: 12px;
  line-height: 1.3;
}

#cojobo-umschalter .cojobo-umschalter__paar a:focus-visible {
  outline: 2px solid var(--cojobo-umschalter-ringblau);
  outline-offset: -2px;
}

/*
 * CoJoBo-Erscheinungsbild fuer das osTicket-Kundenportal
 * (support.cojobo.net/ticket/). Ziel: Doku und Tickets wirken wie EINE Seite.
 * Aufbau, Masse und Farben folgen der Support-Doku (Docusaurus/Infima, Wiki-
 * Repo cojobowiki; gemessen 23.11.2026):
 *
 *   Leiste     60 px, Navy #060F33, Siegel 32 px, Titel 16 px/700,
 *              Links 16 px/500, aktiv mit 2 px Unterstrich #94AEFF
 *   Inhalt     hoechstens 1140 px, Rand 16 px, system-ui 16 px / 1.65,
 *              Text #1C1E21, Links #1D4C86 (--ifm-color-primary der Doku)
 *   Fuss       #303846 (footer--dark), Spalten, Copyright
 *
 * Kopf- und Fussbaustein: cojobo-kopf.inc.php, cojobo-fuss.inc.php. Die
 * osTicket-eigene Kopfzeile (#header) und der alte Fuss (#footer) sind
 * ausgeblendet; die Ticket-Navigation (#nav) wird zur Unterleiste.
 * Geladen nach assets/default/css/theme.css; ueberschreibt nur, was es nennt.
 */

:root {
  --cojobo-navy: #060f33;
  --cojobo-royalblau: #0e2882;
  --cojobo-ringblau: #94aeff;
  --cojobo-eisblau: #e6eeff;
  /* wie die Doku (Infima-Variablen dort) */
  --cojobo-primaer: #1d4c86;
  --cojobo-primaer-dunkel: #194171;
  --cojobo-text: #1c1e21;
  --cojobo-grau-100: #f5f6f7;
  --cojobo-grau-300: #dadde1;
  --cojobo-grau-700: #606770;
  --cojobo-fuss: #303846;
  --cojobo-breite: 1140px;
  --cojobo-schrift: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans",
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  /* linker Rand, damit Leisten mit voller Breite und der Inhalt fluchten */
  --cojobo-rand: max(16px, calc((100vw - var(--cojobo-breite)) / 2 + 16px));
}

/* ------------------------------------------------------------ Grundlage */

body {
  background: #fff;
  color: var(--cojobo-text);
  font-size: 16px;
  line-height: 1.65;
}

body,
input,
select,
textarea,
button {
  font-family: var(--cojobo-schrift);
}

a,
.link {
  color: var(--cojobo-primaer);
  text-decoration: none;
}

a:hover,
.link:hover {
  color: var(--cojobo-primaer-dunkel);
  text-decoration: underline;
}

h1,
h2,
h3 {
  color: var(--cojobo-text);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }

/* Rahmen von osTicket (840 px breite Karte mit Schatten) aufloesen. */
#container {
  width: auto;
  margin: 0;
  background: transparent;
  box-shadow: none;
}

/* Fuss unten am Fenster, wenn die Seite kurz ist (wie die Doku): Leiste,
   Inhalt und Fuss stehen als Spalte, der Inhalt fuellt den freien Platz.
   #overlay und #loading sind fest positioniert und zaehlen nicht mit. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
}

body > #container {
  flex: 1 0 auto;
}

/* osTicket-Kopfzeile: ersetzt durch die Leiste (cojobo-kopf.inc.php). */
#header,
#container > .clear {
  display: none;
}

/* ------------------------------------------------------ Leiste (wie Doku) */

.cojobo-leiste {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cojobo-navy);
  border-bottom: 1px solid rgba(148, 174, 255, 0.16);
}

.cojobo-leiste__innen {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 8px 16px;
  box-sizing: border-box;
}

.cojobo-leiste__marke {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 16px;
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}

.cojobo-leiste__marke:hover {
  color: #fff;
  text-decoration: none;
}

.cojobo-leiste__marke img {
  width: 32px;
  height: 32px;
}

.cojobo-leiste__links,
.cojobo-leiste__rechts {
  display: flex;
  align-items: center;
  min-width: 0;
}

.cojobo-leiste__rechts {
  margin-left: auto;
  gap: 4px;
}

.cojobo-leiste__link {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 4px 12px;
  color: rgba(255, 255, 255, 0.86);
  font: 500 16px/1.65 var(--cojobo-schrift);
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
}

.cojobo-leiste__link:hover {
  color: #fff;
  text-decoration: none;
}

.cojobo-leiste__link.is-aktiv {
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--cojobo-ringblau);
}

.cojobo-leiste__name {
  color: rgba(230, 238, 255, 0.82);
  font-size: 14px;
  padding: 0 4px;
  white-space: nowrap;
}

/* wie der Login-Knopf der Doku */
.cojobo-leiste__knopf {
  margin-left: 4px;
  padding: 4px 12px;
  color: var(--cojobo-royalblau);
  background: #fff;
  border-radius: 6.4px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.cojobo-leiste__knopf:hover {
  color: var(--cojobo-royalblau);
  background: var(--cojobo-eisblau);
  text-decoration: none;
}

/* App-Umschalter vor der Marke (Stile: cojobo-umschalter.css, beim Bau
   vorangestellt), wie im Network Visualizer */
.cojobo-leiste .cojobo-umschalter {
  margin: 0 6px 0 -6px;
}

/* Schmal: wie die Doku ohne Textlinks; Siegel/Titel fuehren zur Doku, die
   Ticket-Aktionen stehen in der Unterleiste. */
@media (max-width: 996px) {
  .cojobo-leiste__links,
  .cojobo-leiste__name {
    display: none;
  }

  /* Smartphone wie die Doku: links Umschalter (und Anmelden/Abmelden),
     rechts "CoJoBo Support" mit dem Siegel in der Ecke. */
  .cojobo-leiste__rechts {
    order: 1;
    margin-left: 0;
  }

  .cojobo-leiste__marke {
    order: 2;
    flex-direction: row-reverse;
    margin-left: auto;
    margin-right: 0;
  }
}

/* ---------------------------------- Ticket-Navigation als Unterleiste */

#nav {
  height: auto;
  margin: 0;
  padding: 0 var(--cojobo-rand);
  background: #fff;
  border-top: 0;
  border-bottom: 1px solid var(--cojobo-grau-300);
  box-shadow: none;
  white-space: nowrap;
  overflow-x: auto;
}

#nav li a {
  height: auto;
  margin: 0;
  padding: 12px 16px 10px;
  line-height: 1.5;
  color: var(--cojobo-grau-700);
  font-weight: 600;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  background-image: none !important;
}

.rtl #nav li a {
  padding: 12px 16px 10px;
  margin: 0;
}

#nav li a:hover {
  color: var(--cojobo-primaer);
  background-color: var(--cojobo-grau-100);
  text-decoration: none;
}

#nav li a.active {
  color: var(--cojobo-primaer);
  background-color: transparent;
  border-bottom-color: var(--cojobo-primaer);
}

/* ------------------------------------------------------------ Inhalt */

#content {
  max-width: var(--cojobo-breite);
  margin: 0 auto;
  padding: 32px 16px 48px;
  box-sizing: border-box;
  min-height: 50vh;
}

/* Seiteninhalte und Nachrichten (Startseite, Ticketverlauf) rendert osTicket
   in .thread-body; css/thread.css setzt dort Helvetica und 14px !important.
   Wie die Doku: Systemschrift, 16 px. Innere Absaetze erben nur, damit
   Schriftgroessen aus E-Mails (inline) im Ticketverlauf erhalten bleiben. */
#content .thread-body {
  font-family: var(--cojobo-schrift);
  font-size: 16px !important;
  line-height: 1.65;
  color: var(--cojobo-text);
}

#content .thread-body div,
#content .thread-body p,
#content .thread-body ul,
#content .thread-body ol,
#content .thread-body li,
#content .thread-body td {
  font-size: inherit;
}

#content .thread-body h1,
#content .thread-body h2,
#content .thread-body h3,
#content .thread-body h4 {
  font-family: var(--cojobo-schrift);
  font-weight: 700;
  color: var(--cojobo-text);
}

/* Schmal: Ueberschriften kleiner (wie die Doku auf dem Handy). */
@media (max-width: 996px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* Keine eigene Startseite mehr: index.php leitet auf open.php (einbauen.php),
   die Doku ist die Startseite. Der Reiter dafuer waere ein zweites "Neues
   Ticket". */
#nav li:has(> a.home),
#nav a.home {
  display: none;
}

/* Doku-Hinweis ueber dem Formular (cojobo-doku-hinweis.inc.php), gebaut wie
   ein Doku-Kasten ":::tip" (Infima alert--success). */
.cojobo-hinweis {
  max-width: 800px;
  margin: 8px 0 24px;
  padding: 16px;
  color: #003100;
  background: #e6f6e6;
  border: 1px solid #009400;
  border-left-width: 5px;
  border-radius: 6.4px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.cojobo-hinweis__titel {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.cojobo-hinweis__titel svg {
  width: 1.4em;
  height: 1.4em;
  fill: currentColor;
}

.cojobo-hinweis p {
  margin: 0;
}

.cojobo-hinweis a {
  color: inherit;
  text-decoration: underline;
}

.cojobo-hinweis a:hover {
  color: inherit;
  text-decoration-thickness: 2px;
}

/* ------------------------------------------------- Knoepfe (wie Doku) */

.button,
.button:visited,
.blue.button,
.blue.button:visited {
  max-width: none;
  padding: 6px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
  background-color: var(--cojobo-primaer);
  border: 1px solid var(--cojobo-primaer);
  border-radius: 6.4px;
  box-shadow: none;
  text-shadow: none;
}

.button:hover,
.blue.button:hover {
  color: #fff;
  background-color: var(--cojobo-primaer-dunkel);
  border-color: var(--cojobo-primaer-dunkel);
  text-decoration: none;
}

/* Zweiter Knopf (Ticket-Status): umrandet, wie button--outline. */
.green.button,
.green.button:visited {
  color: var(--cojobo-primaer);
  background-color: transparent;
  border-color: var(--cojobo-primaer);
}

.green.button:hover {
  color: #fff;
  background-color: var(--cojobo-primaer);
}

.front-page-button .button {
  white-space: nowrap;
}

/* Formular-Knoepfe (Ticket eroeffnen, Anmelden, Abbrechen ...) */
#content input[type="submit"],
#content input[type="button"],
#content input[type="reset"],
#content button.action-button {
  padding: 6px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--cojobo-primaer);
  background: #fff;
  border: 1px solid var(--cojobo-primaer);
  border-radius: 6.4px;
  cursor: pointer;
}

#content input[type="submit"] {
  color: #fff;
  background: var(--cojobo-primaer);
}

#content input[type="submit"]:hover {
  background: var(--cojobo-primaer-dunkel);
  border-color: var(--cojobo-primaer-dunkel);
}

#content input[type="button"]:hover,
#content input[type="reset"]:hover {
  background: var(--cojobo-grau-100);
}

/* Eingabefelder: ruhiger Rahmen, runde Ecken wie die Karten der Doku */
#content input[type="text"],
#content input[type="email"],
#content input[type="password"],
#content input[type="tel"],
#content input[type="number"],
#content select,
#content textarea {
  border: 1px solid var(--cojobo-grau-300);
  border-radius: 6.4px;
  padding: 4px 8px;
}

#content input:focus,
#content select:focus,
#content textarea:focus {
  outline: 2px solid var(--cojobo-ringblau);
  outline-offset: 0;
  border-color: var(--cojobo-primaer);
}

/* Anmelde- und Statuskasten: flach wie die Karten der Doku, ohne Innen-
   schatten und ohne das alte Hochglanz-Schloss. */
#clientLogin {
  background: var(--cojobo-grau-100) none;
  border: 1px solid var(--cojobo-grau-300);
  border-radius: 6.4px;
  box-shadow: none;
}

#clientLogin .login-box {
  box-shadow: none;
}

/* ------------------------------------------------------ Fuss (wie Doku) */

#footer {
  display: none;
}

.cojobo-fuss {
  color: #ebedf0;
  background: var(--cojobo-fuss);
  padding: 32px 0;
}

.cojobo-fuss__innen {
  max-width: var(--cojobo-breite);
  margin: 0 auto;
  padding: 0 16px;
}

.cojobo-fuss__spalten {
  display: flex;
  flex-wrap: wrap;
}

.cojobo-fuss__spalte {
  flex: 1 1 260px;
  margin-bottom: 16px;
}

.cojobo-fuss__titel {
  color: #fff;
  font-weight: 700;
  margin-bottom: 8px;
}

.cojobo-fuss ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cojobo-fuss li {
  line-height: 2;
}

.cojobo-fuss a {
  color: #ebedf0;
}

.cojobo-fuss a:hover {
  color: var(--cojobo-ringblau);
}

.cojobo-fuss__copyright {
  margin-top: 16px;
  text-align: center;
}
