
// @require ../expander.scss

/* CLOSING & CLOSED */

.expander.closing,
.expander:not(.open):not(.opening) {

  /* IS A CARD */

  &.card {

    //FIXME: We are taking for granted that there will be only the toggler visible

    &:not(.horizontal) { //TODO: Move direction-related styles to their own files

      > :not(.expander-content) {
        @include border-bottom-radius ( inherit );
      }

    }

    &.horizontal { //TODO: Move direction-related styles to their own files

      > :not(.expander-content) {
        @include border-right-radius ( inherit );
      }

    }

  }

}

/* CLOSED */

.expander:not(.open):not(.opening):not(.closing) {

  /* IS CARD */

  &.card {

    &.horizontal { //TODO: Move direction-related styles to their own files
      display: inline-flex;
    }

    &.bordered > :not(.expander-content) {
      margin-bottom: - $border-width !important;
    }

  }

  /* CONTENT */

  > .expander-content:not([class*="slide"]) {
    overflow: hidden;
  }

  &:not(.horizontal) { //TODO: Move direction-related styles to their own files

    > .expander-content:not([class*="slide"]) {
      height: 0;
      padding-top: 0;
      padding-bottom: 0;
      border-top-width: 0;
      border-bottom-width: 0;
    }

  }

  &.horizontal { //TODO: Move direction-related styles to their own files

    > .expander-content:not([class*="slide"]) {
      width: 0;
      padding-left: 0;
      padding-right: 0;
      border-left-width: 0;
      border-right-width: 0;
    }

  }

}
