/**
 * CSS Anpassungen fuer FAU - CiviCRM
 *
 * Include via Resource URLs > Custom CSS URL '[cms.root]/sites/default/files/fau.css'
 *
 * Drupal CSS is included via https://www.drupal.org/project/asset_injector (for theme 'Olivero')
 */

@import url('./river_lea_fixes.css');

/* FAU-icon */
/* war nur menu, jetzt aber allgemein
#civicrm-menu-nav */
.fa-user-astronaut::before {
  content: url('/sites/default/files/fau-katze_bw.png');
}


/**
 * IO Anpassungen: Menu-Punkte erst mal nur ausblenden
 *
 * @nice-to-have besser grundsaetzlich in cs_fau_civicrm_navigationMenu()
 * (oder in cs_fau_leipzig)
 */
/* menu "Mailings" */
body.role-internes_organizing #civicrm-menu > li[data-name="Mailings"],
/* "Zwischen"-Punkt (ohne eigenen Link), hat fuer IO keine Unterpunkte, trotzdem verbergen */
body.role-internes_organizing #civicrm-menu > li[data-name="FAU"] li[data-name="Import/Korrektur"]
{
  display: none;
}


/* crm-af-field-help-pos */

/*
 * Contact:
 * - .CRM_Contact_Form_Contact = Edit all-at-once
 * - .crm-inline-edit.form     = inline-edit
 */

/* FAUL: kapazitaeten + Beweggründe sind sehr lang (und sonst in einer Zeile)
 * - field 112 "Kapazitäten": Optionen pro Zeile = 1
 *   damit inline-edit OK, aber all-at-once extrem schmal
 *    ("Unreg-
 *      el-
 *      mäßi-
 *      ge Un- [...]"
 * - "Schwerpunkt Alltag": Optionen pro Zeile = 2
 */
/* so in *einer* (immer noch langen) Zeile
.CRM_Contact_Form_Contact details#Weiteres tr[role="radiogroup"] .html-adjust .crm-option-label-pair label,
.CRM_Contact_Form_Contact details#Beweggr_nde tr .html-adjust .crm-option-label-pair label {
  display: ruby;
} */
/* Problem scheint eher '<div class="crm-option-label-pair"><div class="crm-option-label-pair">' zu sein ... */
.CRM_Contact_Form_Contact details#Weiteres tr .html-adjust .crm-options-per-line > .crm-option-label-pair,
.CRM_Contact_Form_Contact details#Beweggr_nde tr .html-adjust .crm-options-per-line > .crm-option-label-pair,
.CRM_Contact_Form_Contact details#FAU tr .html-adjust .crm-options-per-line > .crm-option-label-pair {
  display: unset;
}

/* Multi-Felder mit langen Optionsnamen sind sonst abgeschnitten (all-at-once ist OK) */
.crm-container .crm-inline-edit.form .select2-container:not(.four, .six, .eight, .twelve, .medium) {
  width: auto !important;
}

/* sonst sind dann in inline-edit die langen options abgeschnitten */
/* nur "Weiteres" (gid 13) = .crm-container #custom-set-content-13.crm-inline-edit.form */
.crm-container .crm-inline-edit.form .crm-multiple-checkbox-radio-options .crm-option-label-pair {
  display: unset;
}

/*
.crm-container .crm-multiple-checkbox-radio-options .crm-option-label-pair
 */

/* Versuche *ohne* Optionen-pro-Zeile, .custom_112_1-row griff mal, jetzt .custom_112_105-row. sic.
// Weiteres: Kapazitäten
.CRM_Contact_Form_Contact tr.custom_field-row.custom_112_1-row .html-adjust label,
.crm-inline-edit.form tr.custom_field-row.custom_112_1-row .html-adjust label,
// Kollektive Beweggründe
.CRM_Contact_Form_Contact tr.custom_field-row.custom_103_1-row .html-adjust label,
.crm-inline-edit.form tr.custom_field-row.custom_103_1-row .html-adjust label,
// Individuelle Beweggründe
.CRM_Contact_Form_Contact tr.custom_field-row.custom_104_1-row .html-adjust label,
.crm-inline-edit.form tr.custom_field-row.custom_104_1-row .html-adjust label,
// Aktivistische Beweggründe
.CRM_Contact_Form_Contact tr.custom_field-row.custom_108_1-row .html-adjust label,
.crm-inline-edit.form tr.custom_field-row.custom_108_1-row .html-adjust label,
// Sonstige Beweggründe
.CRM_Contact_Form_Contact tr.custom_field-row.custom_110_1-row .html-adjust label,
.crm-inline-edit.form tr.custom_field-row.custom_110_1-row .html-adjust label {
  display: block;
} */

/*
 * Import-Hinweise (/civicrm/import-hinweise)
 */
/* Breite Anmerkungen-Felder */
crm-search-display-table[search-name="Migrations_Hinweise"] th:nth-child(6),
crm-search-display-table[search-name="Migrations_Hinweise"] th:nth-child(7) {
  width: 25%;
}
/* Anmerkungs-Felder */
td[data-field-name="Migration_Altdaten_tempor_r.Anmerkungen_Import"] .crm-search-field-value,
td[data-field-name="Migration_Altdaten_tempor_r.Anmerkungen_Import_2"] .crm-search-field-value {
  white-space: pre-line;
}

/* Contact-Detail: Migrationshinweise */
.crm-contact-page table.crm-info-panel td.label {
  font-weight: bold;
  vertical-align: top;
}
.crm-contact-page table.crm-info-panel tr {
  border-bottom: var(--crm-table-row-border);
}


/*
 * IO
 */
/* kontakt-suche: filter verbergen (inhaltlich kein problem, da IO eh nur mitglieder sieht */
body.role-internes_organizing.page-civicrm-searchui af-field[name="contact_type"],
body.role-internes_organizing.page-civicrm-searchui af-field[name="contact_sub_type"],
body.role-internes_organizing.page-civicrm-searchui af-field[name="groups"],
  /* Kontakt-Dateil: Edit-Button verbergen */
body.role-internes_organizing.page-civicrm-contact .crm-container .crm-actions-ribbon a.button.edit,
body.role-internes_organizing.page-civicrm-contact .crm-container .crm-actions-ribbon a.button.edit:link,
body.role-internes_organizing.page-civicrm-contact .crm-container .crm-actions-ribbon a.button.edit:visited,
/* inline edit kontakt-name: edit-hinweis */
body.role-internes_organizing.page-civicrm-contact .crm-container #crm-contactname-content .crm-edit-help
{
  display: none !important;
}
/* inline edit kontakt-name: edit-hervorhebung */
body.role-internes_organizing.page-civicrm-contact .crm-container #crm-contactname-content > .crm-inline-block-content {
  border: none;
}



/**
 * Ab hier nicht-projekt-spezifisches.
 * Evtl. CS-eigenes River-Lea-Subtheme?
 */

/*
 * BACKEND >  Contact Summary
 *
 * "Tobias' standard"
 */
/* Selector '#contact-summary .afform-directive crm-search-display-table' = SK-Table included in contact-summary  */
#contact-summary .afform-directive crm-search-display-table table {width: 100%;}
#contact-summary .afform-directive crm-search-display-table table th {background: var(--crm-contact-label-bg-color);}
/* wozu?
#contact-summary .afform-directive h4 {padding: 1em;} */
#contact-summary .afform-directive crm-search-display-table .form-inline {padding: 0;}
#contact-summary .afform-directive:has(> .af-admin-edit-form-link) .crm-search-display {padding-top: 0 !important;}

#contact-summary .collapsible-title {
  margin: 1em 0 0;

  /* use vars */
  font-weight: var(--crm-accordion-header-weight);
  /* typically 0.25rem 0.5rem */
  padding: var(--crm-accordion-header-padding);
  /* colors from menubar */
  background-color: var(--crm-menubar-color);
  color: var(--crm-menubar-text-color);
  /* border-radius like tabs */
  border-radius: var(--crm-contact-tabs-radius)

  /*
  padding: 0.3em 0.8em;
  background: grey;
  color: #fff;
  font-weight: 500;
  border-radius: 3px 3px 0 0;
  -moz-border-radius: 0px;  removed in Gecko 13.0 (Firefox 13.0 / Thunderbird 13.0 / SeaMonkey 2.10)
  -webkit-border-radius: 3px 3px 0 0;
  */
}
/* First box in a column ... */
#contact-summary .collapsible-title:nth-child(0) {
  /* no top margin */
  margin-top: 0;
}
/* collapsible box ... */
#contact-summary .crm-contact-summary-layout-col .crm-summary-block {
  /* standard is indented (like an accordion, --crm-accordion-body-padding, typically 1rem) */
  padding: 0;
}

/**
 * Increase size of big inputs.
 * Default '--crm-big-input: 15em' is often to short.
 * But for some the size fits (e.g. date).
 * /libraries/civicrm/core/ext/riverlea/core/css/components/_form.css set this for
 * .crm-container input.dateplugin,
 * .crm-container input.form-control,
 * input.crm-form-text,
 * input.crm-form-password,
 * .crm-icon-picker-button,
 * .crm-container .replace-plain,
 * .crm-container input,
 * .crm-container textarea,
 * select.crm-form-multiselect,
 * select.crm-form-select,
 * .crm-container .ui-widget input,
 * .crm-container select,
 * .ui-datepicker .ui-datepicker-header select
 */
/* TEST 1: increase almost *all* inputs -> too much
:root {
  /* Introduce new variable for places where the old one is OK ... /
  --crm-cs-big-input: var(--crm-big-input);
  /* ... increase the original value ... /
  --crm-big-input: 30em;
}
/* ... and reset the old value for some /
.crm-container input.dateplugin,
.crm-icon-picker-button,
.ui-datepicker .ui-datepicker-header select {
  width: var(--crm-cs-big-input);
}
/* Also we increase the size for URL fields
   (this works in summernote edit URL)
/
.crm-container input.note-link-url {
  width: 95%;
}
*/
/* TEST 2: only increase URL fields */
.crm-container input.note-link-url {
  width: 95%;
}


/* Silbentrennung verbessern */
body {
  hyphenate-limit-chars: auto 5;
}

/* Collapsed Suchfilter, z.B. FAU member */
#crm-main-content-wrapper form details.af-container-style-pane {
  background-color: var(--crm-c-background);
}
#crm-main-content-wrapper form details.af-container-style-pane .af-container {
  margin-left: 1em;
}
/* Ueber und unter Buttons (die sollten im untersten container stehen) etwas Abstand */
#crm-main-content-wrapper form details.af-container-style-pane .af-container button {
  margin-top: 1em;
  margin-bottom: 1em;
}
/* post-help text */
#crm-main-content-wrapper form details.af-container-style-pane .af-container .crm-af-field-help-post {
  font-style: italic;
  font-size: 90%;
}

/* inline-edit (hebt sich zu wenig ab) beispiel FAU-box kontakt */
.crm-inline-edit.form {
  /* war: border: 1px solid var(--crm-c-focus); */
  border-width: 3px;
  border-color: red;
  /* background-color: etwas dunkler?
    ist: background: var(--crm-inline-edit-bg);
    = var(--crm-c-background) - sollte m.E. aber andere Farbe sein
    -> --crm-inline-edit-bg setzen
   */

  /* evtl. etwas vom Rand weg?
    left: 0;
    testen mit allen blocks inbesondere links/rechts!!!
   */
}
.crm-container .crm-inline-edit:hover,
.crm-container .crm-editable-enabled:hover {
  /* war: border: var(--crm-dash-edit-border);
     = 2 px dashed var(--crm-c-gray-300)
   */
  border-color: red;
}

/**
 * tutorials (org.civicrm.tutorial)
 */
/* Tutorial-Text mit Zeilenumbruch */
div.hopscotch-bubble .hopscotch-content {
  /* Sequences of whitespace will collapse into a single whitespace. Text will wrap when necessary, and on line breaks */
  white-space: pre-line;
}


/**
 * BACKEND -----------------------------------------------------------------
 */

/**
 * Import-Vorschau besser lesbar
 */
.page-civicrm-csvimporter .crm-import-maptable-form-block td.odd-row,
.page-civicrm-csvimporter .crm-import-preview-form-block td.odd-row {
  /* .odd-row ist hier nicht die Zeile, sondern nur die Inhalts-Zellen */
  white-space: pre;
}

/**
 * Mesage template > fullscreen edit
 */
.note-editor.note-frame.fullscreen {
  /* sonst transparent und normale seite scheint durch */
  /* Update 2026-01: nicht mehr noetig - CiviCRM 6.9.2
  background-color: var(--crm-form-block-background); */
}

/* weight field is to small (you cannot read the value) */
.crm-container .CRM_Custom_Form_Field .crm-custom-field-form-block-weight .two {
  width: 5rem;
}

/* In many cases inputs are to small */
.crm-container .select2-container {
  /* originally (libraries/civicrm/core/ext/riverlea/core/css/components/_form.css:851
     width: var(--crm-big-input) !important;
     var '--crm-big-input' = 15em - @nice-to-have increase var
  */
  width: 25em !important;
}

/**
 * Searchkit: filter
 */
.crm-search-admin-outer .panel .panel-body .crm-search-wheres .api4-input .api4-input-group div.crm-auto-width .select2-chosen {
  /* Otherwise the delete-"x" is hidden if labels are too short (e.g. "Status") */
  min-width: 5em;
}
