/*
 * CiviCRM an die LAG-Portale angepasst.
 *
 * Eingebunden über die CiviCRM-Einstellung customCSSURL.
 *
 * Wichtig: Die seitlichen Reiter der Kontaktansicht bringt Riverlea (Stream
 * Thames) selbst mit — über CSS-Grid und --crm-contact-side-tabs-width. Hier
 * wird daran NICHT gerührt; ein eigenes display:flex würde das Grid brechen.
 */

/* ---------- Portalfarben in CiviCRM ---------- */

body.portal--lag {
  --crm-c-primary: #c00d2c;
  --crm-c-primary-hover: #96091f;
}

body.portal--gwa {
  --crm-c-primary: #0e5aa0;
  --crm-c-primary-hover: #0a4479;
}

body.portal--gemeinsam {
  --crm-c-primary: #2f7d5c;
  --crm-c-primary-hover: #225f45;
}

body.portal--chancengleich {
  --crm-c-primary: #6b3f8f;
  --crm-c-primary-hover: #52306e;
}

body.portal--kontakt {
  --crm-c-primary: #a8232f;
  --crm-c-primary-hover: #821a24;
}

body[class*="portal--"] {
  --crm-primary-color: var(--crm-c-primary);
  --crm-link-color: var(--crm-c-primary);
  --crm-button-bg: var(--crm-c-primary);
}

/* ---------- Breite ---------- */

/* Die Seitenbreite kommt aus container.css im Theme und gilt hier mit —
   CiviCRM läuft im Drupal-Theme und steckt im selben .container.
   Nur CiviCRMs eigene Innenbegrenzungen werden gelöst. */
body.path-civicrm #crm-container,
body.path-civicrm .crm-container,
body.path-civicrm #crm-main-content-wrapper {
  max-width: none;
  width: 100%;
}

/* Breite Ergebnistabellen scrollen in sich, statt die Seite zu sprengen. */
body.path-civicrm .crm-search-results,
body.path-civicrm .crm-results-block,
body.path-civicrm .crm-content-block > table {
  overflow-x: auto;
}

/* ---------- Kleinigkeiten ---------- */

/* CiviCRM bringt seinen eigenen Seitentitel mit — der von Drupal ist doppelt. */
body.path-civicrm .block-page-title-block {
  display: none;
}

.crm-container h1,
#crm-container .crm-title {
  color: var(--crm-c-primary-hover, #0a4479);
}
