/* ------------------------
Common/UI elements (images, video, buttons, etc)
------------------------ */

video {
  max-width: 100%;
  height: auto;
}

.back-to-top {
  text-align: right;
  display: block;
}

img.alignright,
img.alignleft,
img.aligncenter,
img.alignnone,
.caption {
  display: block;
  height: auto;
  margin: 0 auto 1em;
  max-width: 100%;
}

img.alignright,
img.alignleft {
  float: none;

  @media (min-width: 768px) {
    margin-bottom: 1em;
    max-width: 50%;
  }
}

img.alignleft {
  @media (min-width: 768px) {
    float: left;
    margin-right: 1em;
  }
}

img.alignright {
  @media (min-width: 768px) {
    float: right;
    margin-left: 1em;
  }
}

.wp-caption {
  max-width: 95%;

  img {
    width: 100%;
    height: auto;
  }
}

img.alignleft,
img.alignright,
img.aligncenter,
.yes-frame {
  visibility: visible;
}

.button,
.buttons a,
.anchor-links a {
  font-size: 16px;
  line-height: 1em;
  font-weight: var(--fw-regular);
  font-family: var(--primary-font);
  cursor: pointer;
  display: inline-block;
  position: relative;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 14px 26px;
  transition: all 0.5s;

  &:hover {
    background-color: var(--primary-alt);
    color: var(--light-color);
    transition: all 0.5s;
    cursor: pointer;
  }

  &.btn-inverse {
    background-color: var(--secondary-color);
    &:hover {
      background-color: var(--secondary-alt);
      color: var(--light-color);
    }
  }
}

blockquote {
  font-size: 20px;
  line-height: 1.5em;
  position: relative;
  margin: 40px 0;
  font-style: italic;
  font-family: var(--highlight-font);
  color: var(--primary-highlight);
  border-top: 1px solid var(--secondary-color);
  border-bottom: 1px solid var(--secondary-color);

  @media (min-width: 768px) {
    margin: 60px 0;
    padding: 40px 60px;
  }

  @media (min-width: 1060px) {
    font-size: 27px;
  }

  footer {
    font-size: 24px;
    line-height: 1em;
    color: var(--dark-alt);
    font-style: normal;

    @media (min-width: 1060px) {
      font-size: 26px;
    }

    &::before {
      content: "~ ";
    }
  }
}

.disclaimer {
  font-size: 11px;
  font-style: italic;
}

.two-column {
  @media (min-width: 768px) {
    column-count: 2;
    column-gap: 40px;
  }
}

.spaced-list {
  li {
    margin-bottom: 1.5em;
    padding-left: 30px !important;
  }
}

.b-lazy {
  transition: opacity 500ms ease-in-out;
  max-width: 100%;
  opacity: 0;
}

.b-lazy.b-loaded {
  opacity: 1;
}

::selection {
  background: rgb(from var(--primary-color) r g b / 0.75)
}

/*=====================================================================
=            Responsive iFrames and wysiwyg Youtube videos            =
=====================================================================*/

.ytvideo {
  background-size: cover;
}

.iframe-container,
.ytvideo {
  position: relative;
  height: 0;
  overflow: hidden;

  iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    min-height: 0;
  }
}

/* 16x9 Aspect Ratio */
.iframe-container-16x9,
.ytvideo {
  padding-bottom: 56.25%;
}

/* 4x3 Aspect Ratio */
.iframe-container-4x3 {
  padding-bottom: 75%;
}

.custom-placeholder {
  position: relative;
}

.ytvideo.clicked {
  background: none !important;
}

.ytvideo.clicked::after,
.custom-placeholder.clicked::after {
  display: none;
}

.ytvideo::after,
.custom-placeholder::after {
  content: '\f144';
  font-family: "Font Awesome 5 Pro";
  font-style: normal;
  position: absolute;
  font-size: 100px;
  font-weight: 700;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.5);
}

.custom-placeholder {
  img {
    max-width: 100%;
  }
}

/*=====  End of Responsive iFrames and wysiwyg Youtube videos  ======*/

/* Social Blur */
.social-blur {
  position: relative;
  display: inline-block;
  overflow: hidden;

  &::after {
    content: 'View Image';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    color: var(--light-color);
    font-size: 20px;
    font-weight: var(--fw-bold);
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(from var(--dark-color) r g b / 0.5);
  }

  &.no-blur {
    &::after {
      display: none;
    }

    img {
      filter: blur(0);
    }
  }

  img,
  video {
    filter: blur(15px);
  }
}
/* End Social Blur */

.no-wrap {
  white-space: nowrap;
}

.anchor-links {
  list-style: none;
  margin: 2em 0 !important;

  @media (min-width: 768px) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
    row-gap: 15px;
  }

  @media (min-width: 1060px) {
    grid-template-columns: 1fr 1fr 1fr;
  }

  li {
    padding-left: 0 !important;
    margin-bottom: 10px;

    @media (min-width: 768px) {
      margin-bottom: 0;
    }

    &::before {
      display: none;
    }
  }

  a {
    /* Specific to .anchor-links a */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}