.layout-padding > md-expansion-panel-group {
  padding: 0;
}

/* --- Expansion Panel --- */

md-expansion-panel {
  display: block;
  position: relative;
  outline: none;
  margin-top: 0;
  margin-bottom: 0;
  padding: 0;
  box-shadow: 0 -1px 0 #e5e5e5,
              0 0 2px rgba(0,0,0,.12),
              0 2px 4px rgba(0,0,0,.24);


  &.md-open {
    margin-top: 16px;
    margin-bottom: 16px;

    &:first-of-type {
      margin-top: 0;
    }
  }

  &.md-close {
    overflow: hidden;
  }

  &:not(.md-no-animation) {
    &.md-open {
      transition: margin-top 0.12s cubic-bezier(0.25, 0.8, 0.25, 1),
                  margin-bottom 0.12s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    &.md-close {
      transition: margin-top 0.08s cubic-bezier(0.25, 0.8, 0.25, 1),
                  margin-bottom 0.08s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
  }
}





md-expansion-panel-collapsed .md-title,
md-expansion-panel-header .md-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  min-width: 80px;
  max-width: 184px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  white-space: nowrap;
}

md-expansion-panel-collapsed .md-summary,
md-expansion-panel-header .md-summary {
  flex: 1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  white-space: nowrap;
}



/* --- Expansion Panel Collapsed ---- */

md-expansion-panel {
  md-expansion-panel-collapsed {
    display: flex;
    min-height: 48px;
    line-height: 48px;
    padding: 0 24px;
    opacity: 1;
    z-index: 2;
    box-sizing: border-box;


    &.md-absolute {
      position: absolute;
    }

    &.md-hide {
      opacity: 0;
    }
  }

  &:not(.md-no-animation) {
    md-expansion-panel-collapsed {
      &.md-show {
        transition: opacity 0.03s linear;
      }

      &.md-hide {
        transition: opacity 0.1s cubic-bezier(0.25, 0.8, 0.25, 1);
      }
    }
  }
}




/* --- Expansion Panel Expanded --- */

md-expansion-panel {
  md-expansion-panel-expanded {
    display: none;
    min-height: 48px;


    &.md-show,
    &.md-hide {
      display: block;
    }

    &.md-scroll-y {
      overflow-y: auto;
    }

    &.md-overflow {
      overflow: hidden
    }


    md-expansion-panel-content {
      display: block;
      padding: 16px 24px;
    }
  }

  &:not(.md-no-animation) {
    md-expansion-panel-expanded {
      &.md-show {
        transition: max-height 0.12s cubic-bezier(0.25, 0.8, 0.25, 1),
                    opacity 0.12s cubic-bezier(0.25, 0.8, 0.25, 1);
      }

      &.md-hide {
        transition: max-height 0.06s cubic-bezier(0.25, 0.8, 0.25, 1),
                    opacity 0.06s cubic-bezier(0.25, 0.8, 0.25, 1);
      }
    }
  }
}



/* --- Expansion Panel Header --- */

md-expansion-panel-header {
  display: block;
  position: relative;
  outline: none;


  .md-expansion-panel-header-container {
    display: flex;
    min-height: 48px;
    line-height: 48px;
    padding: 0 24px;
    box-sizing: border-box;
    border-bottom: 1px solid;
    align-items: center;
  }

  &.md-stick {
    .md-expansion-panel-header-container {
      position: fixed;
      z-index: 2;
      animation: panelBodyHeaderStickyHoverIn 0.3s ease-out both;
    }
  }

  &.md-no-stick {
    .md-expansion-panel-header-container {
      animation: panelBodyHeaderStickyHoverOut 0.3s ease-out both;
    }
  }
}




/* --- Expansion Panel Footer --- */


md-expansion-panel-footer {
  display: block;
  position: relative;

  &.md-show,
  &.md-hide {
    display: block;
  }


  .md-expansion-panel-footer-container {
    display: flex;
    min-height: 48px;
    line-height: 48px;
    padding: 0 24px;
    border-top: 1px solid;
    box-sizing: border-box;
  }


  &.md-stick {
    .md-expansion-panel-footer-container {
      position: fixed;
      z-index: 2;
    }
  }
}




/* --- expand icon --- */

md-expansion-panel {
  &:not(.md-no-animation) {
    .md-expansion-panel-icon {
      transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
  }

  .md-expansion-panel-icon {
    transform: rotate(90deg);
    &:first-child {
      margin-right: 18px;
    }
  }


  &.md-open {
    > md-expansion-panel-expanded > md-expansion-panel-header .md-expansion-panel-header-container .md-expansion-panel-icon {
      transform: rotate(-90deg);
    }

    > md-expansion-panel.md-open > md-expansion-panel-collapsed .md-expansion-panel-icon {
      transform: rotate(-90deg);
    }
  }
}



@keyframes panelBodyHeaderStickyHoverIn {
  0% {
    box-shadow: 0 0 0 0 transparent;
  }
  100% {
    box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.16);
  }
}

@keyframes panelBodyHeaderStickyHoverOut {
  0% {
    box-shadow: 0px 2px 4px 0 rgba(0, 0, 0, 0.16);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
