/**
 * @file
 * Shared slideshow controls and supported image layouts.
 */

#slider {
  position: relative;
}

.rnd #slider.slider--content-width .slides {
  border-radius: 5px;
}

#slider:where(.slider--half) {
  border-bottom: 1px dashed #ccc;
}

#slider:where(:not(.slider--half)) {
  color: #fff;
}

#slider a:active,
#slider a:hover {
  outline: none;
  text-decoration: none;
}

.slides {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

#slider .slides > li {
  display: none;
  position: relative;
  margin: 0;
}

#slider .post {
  display: flow-root;
}

.flex-control-nav {
  position: absolute;
  bottom: 5%;
  margin: 0;
  padding: 0;
  text-align: center;
}

:where(#slider:where(.slider--half)) .flex-control-nav {
  right: 5%;
}

:where(#slider:where(:not(.slider--half))) .flex-control-nav {
  right: 50%;
  transform: translate(50%, 0);
}

.flex-control-nav li {
  display: inline-block;
  margin: 0 0 0 1em;
  float: left;
}

[dir="rtl"] .flex-control-nav li {
  margin: 0 1em 0 0;
  float: right;
}

.flex-control-nav li:first-child {
  margin: 0;
}

.flex-control-nav li button {
  display: block;
  width: 1.7em;
  height: 1.7em;
  line-height: 1.7em;
  font-weight: bold;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  box-shadow: 0 0 3px #999;
  border-radius: 100%;
  border: 0;
  padding: 0;
}

.flex-control-nav li button.active,
.flex-control-nav li button:hover,
.flex-control-nav li button:focus {
  background: #000;
}

#slider:where(.slider--half) .post {
  padding: 10px 20px;
  margin: 0;
}

#slider:where(.slider--half) .entry-container {
  float: right;
  width: 50%;
  padding-bottom: 4em;
}

#slider:where(:not(.slider--half)) .entry-container {
  position: absolute;
  z-index: 1;
  width: 100%;
}

#slider .slide-image {
  object-fit: cover;
}

#slider:where(.slider--half) .slide-image {
  width: 49%;
  padding: .5%;
  background: #e9e9e9;
}

#slider:where(:not(.slider--half)) .slide-image {
  float: none;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
}

#slider:where(.slider--half) .entry-header {
  margin: 0 0 0 5%;
}

#slider:where(:not(.slider--half)) .entry-header {
  margin: 0 0 2em;
}

#slider:where(.slider--half) .entry-summary {
  margin: 0 0 0 5%;
}

#slider:where(:not(.slider--half)) .entry-summary {
  display: inline-block;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.5);
}

#slider .entry-title {
  font-weight: bold;
  font-size: 1.3em;
}

#slider:where(.slider--half) .entry-title {
  margin-bottom: 1.2em;
}

#slider:where(:not(.slider--half)) .entry-title {
  margin: 20px 0 1em;
}

#slider:where(:not(.slider--half)) a {
  color: #fff;
}

:where(#slider:where(:not(.slider--half))) .flex-control-nav li button:not(.active) {
  color: #aaa;
}

#slider:where(:not(.slider--half)) .entry-title a {
  display: inline-block;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.5);
}

#slider .slides > li:not([hidden]):is(:first-child, .is-active) {
  display: list-item;
}

.flex-control-nav button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}


/*** MEDIA SCREENS (35.5, 48 & 64em) ***/

@media screen and (width < 64em) {

  /* Keep content-width slide corners square below desktop width. */
  .rnd #slider.slider--content-width .slides {
    border-radius: 0;
  }

  #slider:where(.slider--half) {
    margin: 0;
    border: none;
    color: #fff;
  }

  #slider:where(.slider--half) a {
    color: #fff;
  }

  #slider:where(.slider--half) .post {
    padding: 0;
  }

  #slider:where(.slider--half) .entry-container {
    position: absolute;
    width: 100%;
    padding-bottom: 0;
  }

  #slider:where(.slider--half) .entry-header {
    margin: 0 0 2em;
  }

  #slider .entry-summary {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
  }

  #slider:where(.slider--half) .entry-summary {
    margin: 0 0 2em;
    background: rgba(0, 0, 0, 0.5);
    padding: 0 10px;
  }

  #slider:where(:not(.slider--half)) .entry-summary {
    margin: 0;
  }

  #slider:where(.slider--half) .entry-title a {
    display: inline-block;
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 10px;
  }

  #slider:where(:not(.slider--half)) .entry-title a {
    margin: 0;
  }

  #slider:where(.slider--half) .slide-image {
    float: none;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  #slider:where(:not(.slider--half)) .entry-title {
    margin: 0;
  }

  :where(#slider:where(:not(.slider--half))) .flex-control-nav {
    display: flex;
  }

}

@media screen and (width < 48em) {

  #slider .entry-summary {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

}

@media screen and (width < 35.5em) {

  #slider .slide-image {
    height: 15em;
  }

}
