/**************************************
 * variable reference
 * PHP will request the settings from the template UI and pass the variables 
 * --sep-h     visual thickness 
 * --cap-l-w:  left cap width in CSS px 
 * --cap-r-w:  right cap width in CSS px 

 * --img-left:  left cap
 * --img-mid:   repeating middle
 * --img-right: right cap
 *
 **************************************/

.h-h2, .h-h3 {
  padding-bottom:2px;
  margin-bottom:auto;
}

.ams-knot-sep {
  display: block;
  background-image: url('https://www.mithyr.com/images/hwl/amsep.png');
  width: 804px;
  height: 73px;
  margin: 0 auto;
}

.knot-img-sep {
  position: relative;
  display: block;
  height: var(--sep-h);
  padding-left:  min(var(--cap-l-w), 50%);
  padding-right: min(var(--cap-r-w), 50%);
  /* Repeating middle tile across the available width */
  background-image: var(--img-mid);
  background-repeat: round;                        /* whole tiles only */
  background-position: center;                     /* vertically center the motif */
  background-size: 18px 100%;                      /* fit the separator height */
  background-origin: content-box;
  background-clip: content-box;
  clear:right;
  margin-bottom: 10px;
  width: var(--sep-width);
  margin-left: auto;
  margin-right: auto;
}

/* Both cap */
.knot-img-sep::before,
.knot-img-sep::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;                                      /* stretch to separator height */
  background-size: 100% 100%;                     /* don’t distort aspect ratio */
  background-repeat: no-repeat;
}

/* Left cap */
.knot-img-sep::before {
  left: 0;
  width: var(--cap-l-w);
  background-image: var(--img-left);
  background-position: left center;
}

/* Right cap */
.knot-img-sep::after {
  right: 0;
  width: var(--cap-r-w);
  background-image: var(--img-right);
  background-position: right center;
}