// (C) Copyright 2020 Hewlett-Packard Enterprise Company, L.P.

.hp-collapsible {
  > label {
    display: block;
    font-size: 16px;
    color: $secondary-color; // !important;
    margin-top: 10px;
    margin-bottom: 20px;
    padding-left: 20px;
    background-image: $collapse-open-url;
    background-position: -1px;
    background-repeat: no-repeat;
    cursor: pointer;
    
    html.hp-high-contrast & {
      color: $projection-secondary-color; // !important;
    }
    
    &:hover {
      background-image: $collapse-open-over-url;
      color: $primary-color;
    }
  }
  
  &.hp-collapsed {
    > label {
      background-image: $collapse-url;
      margin-bottom: 10px;
      &:hover {
        background-image: $collapse-over-url;
      }
    }
    > div, > ol, > table {
       //display: none;
       height: 0px; // preserve width for container
       overflow: hidden;
    }
  }
  
  // nested
  > .hp-collapsible {
    > * {
      padding-left: 20px;
      margin-left: 15px;
    }
    > label {
      font-size: 14px;
    }
  }
}

.hp-collapser {
  width: 18px;
  height: 18px;
  background-image: $collapse-url;
  background-position: -1px;
  background-repeat: no-repeat;
  cursor: pointer;
  &:hover {
    background-image: $collapse-over-url;
  }
  &.hp-active {
    background-image: $collapse-open-url;
    &:hover {
      background-image: $collapse-open-over-url;
    }
  }
}

.hp-collapsible {
  margin-bottom: 20px;
  &.hp-collapsed {
    margin-bottom: 0px;
  }
}
