@import '../../../styles/common.scss';

.container {
  @include boxSizing;
  display: grid;

  .title {
    display: grid;
    height: 35px;
    align-items: center;

    grid-template-columns: 1fr;

    color: $form-group-title-color;
    font-size: $form-group-title-font-size;
    font-weight: bold;

    transition: color 200ms cubic-bezier(0.4, 0, 0.2, 1) 0s;

    &.collapsible {
      grid-template-columns: 30px 1fr;
      cursor: pointer;
    }

    &.collapsed {
      color: $form-group-title-alternate-color;
    }
  }

  .content {
    display: grid;
    transition: grid-template-rows 200ms cubic-bezier(0.4, 0, 0.2, 1),
      padding 200ms cubic-bezier(0.4, 0, 0.2, 1);
    grid-template-rows: 0fr;

    &.expanded {
      grid-template-rows: 1fr;
      padding-top: 20px;
    }

    & > div {
      overflow: hidden;
    }
  }
}

.button {
  height: 35px;
  width: 30px;

  svg {
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  svg * {
    stroke: var(--accordion-item-arrow-color, $accordion-item-arrow-color);
  }

  &.rotated > svg {
    transform: rotate(90deg);
  }
}
