/*
* @pagename helpers
* @name transition-expand
* @description Style for the transition-expand class
* @state .transition-expanded - expanded state
* @markup
<div class="transition-expand">Denne div var skjult for et oejeblik siden</div>
*/

.transition-expand {
  max-height: 0;
  overflow: hidden;

  transition: max-height 0.3s;
}

.transition-expand--medium {
  max-height: 150px;
}

.transition-expand--large {
  max-height: 350px;
}

.transition-expand--xlarge {
  max-height: 650px;
  overflow: visible;
}

.transition-expand.expanded,
.transition-expand.transition-expanded,
.cb-expand:checked ~ .transition-expand {
  max-height: 30050px;
}

.transition-expanded--max.expanded,
.transition-expanded--max.transition-expanded,
.cb-expand:checked ~ .transition-expanded--max {
  max-height: 100%;
}

/**
expanded element medium height (150px)
*/
.transition-expand.transition-expanded--medium {
  max-height: 150px;
}

.transition-expand-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.69) 38%,
    rgba(255, 255, 255, 1) 78%,
    rgba(255, 255, 255, 1) 100%
  );
}

/*
@pagename
@name
@description checkbox used as expansion method
@markup
*/
.cb-expand:checked ~ .transition-expand .transition-expand-fade,
.cb-expand:checked ~ .cb-expand-shown,
.cb-expand-hidden,
.cb-expand {
  position: absolute;
  left: -9999em;
  opacity: 0;
}

.cb-expand:checked ~ .cb-expand-hidden {
  position: static;
  opacity: 1;
}

.cb-expand--ani {
  cursor: pointer;
  transition: opacity 0.2s;
}
