/**
 * @file
 * Styling for accordions
 * Added through the .theme file.
 */

/*=======================================
   Accordion
  =======================================*/

/*----------------------------
   Preload
  ----------------------------*/

/* Button
----------------*/
.accordion-button {
  display: inline-block;
  position: relative;
}

.accordion-button:after {
  content: url("../images/icon--down-caret.svg");
  position: absolute;
  font-size: 1.5em;
  display: block;
  top: 50%;
  right: 1em;
  pointer-events: none;
  margin: 0;
  transform: translateY(-50%);
  transition: all 0.3s ease-in-out;
}

/* Content
----------------*/

/* Fix No JS & loading erros */
.accordion-content:not(.closed):not(.open) {
  position: absolute;
  visibility: hidden;
}

.no-js .accordion-content {
  max-height: none !important;
}

.accordion-content.closed {
  max-height: 0 !important;
  padding-top: 0;
  padding-bottom: 0;
  display: block;
}

/*----------------------------
   Open
  ----------------------------*/

/* Content
----------------*/
.accordion-content {
  opacity: 1;
  visibility: visible;
}

/* Button
----------------*/
.accordion-button.open:after {
  transform: translateY(-50%) rotate(-90deg);
}

/*----------------------------
   Closed
  ----------------------------*/