src/components/CollapsibleSection/CollapsibleSection.scss
@import '../../constants/styles';
@import '../../constants/modal';
@import '../../constants/popup.scss';

.CollapsibleSection {
  // Reset default styles
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin: 0;
  }

  @include mobile {
    border-bottom: 1px solid #cfd4da;
  }

  .collapsible-page-group-header {
    outline: 2px solid transparent;
    button {
      width: 100%;
      background-color: transparent;
      border: none;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-radius: 4px;
      cursor: pointer;
      padding: 0 4px;

      .Icon {
        width: 22px;
        height: 22px;
        pointer-events: none;
        color: var(--icon-color);
      }

      &:focus-visible {
        outline: var(--focus-visible-outline);
      }
    }

    // only apply this to the first item in case there are children
    > :first-child:hover {
      box-shadow: inset 0 0 0 1px var(--hover-border);
    }

    @include mobile {
      button {
        font-size: 13px;

        .Icon {
          width: 16px;
          height: 16px;
        }
      }
    }
  }
}
