/* Haberkorn Brand-Farbe (siehe docs/design-system.md) */
:root {
  --brand-primary: #007abc;
  --brand-primary-dark: #006699;
  --bs-primary: #007abc;
  --bs-primary-rgb: 0, 122, 188;
  --bs-link-color: #007abc;
  --bs-link-hover-color: #006699;
}

/* Primäre Buttons auf Brand-Farbe umstellen */
.btn-primary {
  --bs-btn-bg: var(--brand-primary);
  --bs-btn-border-color: var(--brand-primary);
  --bs-btn-hover-bg: var(--brand-primary-dark);
  --bs-btn-hover-border-color: var(--brand-primary-dark);
  --bs-btn-active-bg: var(--brand-primary-dark);
  --bs-btn-active-border-color: var(--brand-primary-dark);
}

.text-brand {
  color: var(--brand-primary) !important;
}

/* Marken-Logo/Schriftzug in der Navigation */
.navbar-brand {
  color: var(--brand-primary);
  font-weight: 600;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: var(--brand-primary-dark);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ---------- Produktbaum-Navigation (PROJ-2) ---------- */
.tree-root,
.tree-children {
  padding-left: 0;
}

.tree-children {
  margin-left: 1.1rem;
  border-left: 1px solid var(--bs-border-color);
  padding-left: 0.4rem;
}

.tree-row {
  padding: 0.15rem 0;
}

.tree-caret {
  display: inline-block;
  width: 1rem;
  color: var(--brand-primary);
}

.tree-label {
  text-align: left;
}

.tree-selected > .tree-row {
  background-color: rgba(0, 122, 188, 0.1);
  border-radius: 0.25rem;
}

#detail-carousel img {
  max-height: 320px;
  object-fit: contain;
  background-color: var(--bs-light, #f8f9fa);
}

/* ----- PROJ-4: Ebenen-Verknüpfungen / Vererbung / Verschieben ----- */

/* Auswahl eines höheren Knotens (Ebene 1–3) im Baum optisch markieren. */
.tree-level-label {
  text-align: left;
}

/* Verschiebe-Modus: Baum hervorheben, damit der Quellknoten-Klick erwartet wird. */
body.move-mode .tree-row {
  cursor: copy;
}

body.move-mode #tree-panel {
  outline: 2px dashed var(--brand-primary);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

/* Geerbte Verknüpfung, die durch eine Ausnahme ausgenommen ist. */
.link-excluded .link-name {
  text-decoration: line-through;
  color: var(--bs-secondary, #6c757d);
}

/* Herkunfts-/Geerbt-Hinweis an einer Verknüpfung. */
.link-origin {
  font-size: 0.8rem;
  color: var(--bs-secondary, #6c757d);
}
