projects/ngclient/src/app/core/components/toggle-card/toggle-card.component.scss
@use '@ship-ui/core/styles/helpers' as *;

:host {
  display: flex;
  flex-direction: column;
  border-radius: var(--shape-3);
  background-color: var(--base-2);

  &.active {
    .content {
      max-height: 1000px;
      transition: max-height 1s linear;
      padding: p2r(0 16 16);
    }

    sh-icon {
      transform: rotate(180deg);
    }
  }

  h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font: var(--paragraph-10);
    cursor: pointer;
    user-select: none;
  }

  sh-icon {
    transform: rotate(0);
    transform-origin: center;
    transition: transform 200ms ease;
  }
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: p2r(16);
  padding: p2r(16);

  .title {
    display: flex;
    flex-direction: column;
    gap: p2r(4);
    flex: 1 0;
  }

  .actions:empty {
    display: none;
  }
}

.content {
  display: flex;
  flex-direction: column;
  gap: p2r(16);

  padding: p2r(0 16 0);
  overflow: hidden;
  max-height: 0;
  transition:
    max-height 250ms linear,
    padding 250ms linear;

  &:empty {
    display: none;
  }
}
