:root {
  /* Video */
  --video--border-radius: 11px;
  /* Video - Overlay */
  --video--overlay--background_colour: rgba(0 0 0 / 75%);
  --video--overlay--text_colour: white;
  --video--overlay--font_family: 'Roboto';
  --video--overlay--font_size: 1.375rem;
  --video--overlay--font_weight: 500;
  --video--overlay--font_style: normal;
  --video--overlay--line_height: 120%;
  --video--overlay--text_alignment: center;
  --video--overlay--padding: 10%;
  /* Video - Overlay - Button */
  --video--overlay--button--background_colour: var(--dark_1, #1d42a6);
  --video--overlay--button--text_colour: white;
  --video--overlay--button--border_colour: var(--dark_1, #1d42a6);
  --video--overlay--button--border_size: 1px;
  --video--overlay--button--border_radius: 6px;
  --video--overlay--button--font_family: 'Roboto';
  --video--overlay--button--font_size: 1.375rem;
  --video--overlay--button--font_weight: 500;
  --video--overlay--button--font_style: normal;
  --video--overlay--button--line_height: 120%;
  --video--overlay--button--margin: 20px 0 0 0;
  --video--overlay--button--padding: 20px;
  /* Video - Overlay - Button - Active */
  --video--overlay--button--active--background_colour: white;
  --video--overlay--button--active--text_colour: #1d42a6;
  --video--overlay--button--active--border_colour: #1d42a6;
}
/* Main styling */
.oxfcms-video-wrapper {
  .oxfcms_video_overlay, iframe {
    border-radius: var(--video--border-radius);
  }
  &:has(.oxfcms-caption),
  &:has(.lb-caption) {
    .oxfcms_video_overlay, iframe {
      border-bottom-left-radius: 0;
      border-bottom-right-radius: 0;
    }
  }
  .oxfcms-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    + .oxfcms-caption {
      .oxfcms-caption-content {
        display: flex;
        width: 100%;
        box-sizing: border-box;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        white-space: normal;
      }
    }
    &.oxfcms_video_fixed_width {
      position: relative;
      padding-bottom: unset;
      height: auto;
      font-size: 0;
      .oxfcms_video_fixed_width_container {
        display: inline-block;
        position: relative;
        iframe, .oxfcms_video_iframe {
          position: relative;
          top: auto;
          left: auto;
          width: revert-layer;
          height: revert-layer;
          float: left;
        }
      }
    }
    .oxfcms_video_overlay {
      background: var(--video--overlay--background_colour);
      color: var(--video--overlay--text_colour);
      padding: var(--video--overlay--padding);
      text-align: var(--video--overlay--text_alignment);
      font-family: var(--video--overlay--font_family);
      font-size: var(--video--overlay--font_size);
      font-weight: var(--video--overlay--font_weight);
      font-style: var(--video--overlay--font_style);
      line-height: var(--video--overlay--line_height);
      position: absolute;
      height: 100%;
      width: 100%;
      z-index: 1;
      box-sizing: border-box;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      &.hide {
        display: none;
      }
      p {
        display: flex;
      }
      button {
        background-color: var(--video--overlay--button--background_colour);
        color: var(--video--overlay--button--text_colour);
        padding: var(--video--overlay--button--padding);
        margin: var(--video--overlay--button--margin);
        font-family: var(--video--overlay--button--font_family);
        font-size: var(--video--overlay--button--font_size);
        font-weight: var(--video--overlay--button--font_weight);
        font-style: var(--video--overlay--button--font_style);
        line-height: var(--video--overlay--button--line_height);
        border-width: var(--video--overlay--button--border_size);
        border-color: var(--video--overlay--button--border_colour);
        border-radius: var(--video--overlay--button--border_radius);
        cursor: pointer;
        &:hover, &:focus {
          background-color: var(--video--overlay--button--active--background_colour);
          color: var(--video--overlay--button--active--text_colour);
          border-color: var(--video--overlay--button--active--border_colour);
        }
      }
    }
    iframe, .oxfcms_video_iframe {
      border-top-left-radius: var(--video--border-radius);
      border-top-right-radius: var(--video--border-radius);
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: 0;
    }
  }
}
/* Breakpoint - Small Desktop */

@media (width < 1280px) {
  .oxfcms-video {
    --video--overlay--font_size: 1.25rem;
    --video--overlay--button--font_size: 1.25rem;
  }
  .oxfcms_video_fixed_width_container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    display: block;
  }
  .oxfcms_video_fixed_width iframe, .oxfcms_video_fixed_width .oxfcms_video_iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    float: none;
  }
}
/* Breakpoint - Tablet */

@media (width < 768px) {
  .oxfcms-video {
    --video--overlay--font_size: 1.125rem;
    --video--overlay--button--font_size: 1.125rem;
  }
}
