@use './variables' as collapse-variables;

.mdc-collapse {
  display: flex;
  flex-direction: column;
  margin-bottom: collapse-variables.$collapse-margin-bottom;
}

.mdc-collapse__header {
  display: flex;
  align-items: center;
  align-self: flex-start;
  margin-bottom: collapse-variables.$header-margin-bottom;
}

.mdc-collapse__icon {
  margin-right: collapse-variables.$icon-margin-right;
}

.mdc-collapse__title {
  padding: collapse-variables.$title-padding;
}

.mdc-collapse__content {
  padding: collapse-variables.$content-padding;
}

.mdc-collapse--with-icon {
  .mdc-collapse__header {
    align-self: auto;
  }

  .mdc-collapse__content {
    padding-left: collapse-variables.$icon-width +
      collapse-variables.$icon-margin-right;
  }
}

.mdc-collapse--icon-end-aligned {
  .mdc-collapse__header {
    justify-content: space-between;
  }

  .mdc-collapse__title {
    order: -1;
  }
}
