/* Normalized containers: Mobile fixes applied to prevent horizontal scroll */
.oembed_container,
.embed_container {
  display: block !important;
  position: relative;
  width: 100% !important;
  
  /* FIXED: min() guarantees it never exceeds the mobile viewport width */
  max-width: min(100%, 700px) !important; 
  
  margin-top: clamp(1.5rem, 4vw, 3rem) !important;
  margin-bottom: clamp(1.5rem, 4vw, 3rem) !important;
  margin-left: auto !important; 
  margin-right: auto !important; 
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); 
  background-color: #000; 
  height: auto !important; 
  max-height: none !important; 
  box-sizing: border-box !important;

  /* FIXED: Forces long raw text (like unbroken URLs) to wrap instead of pushing layout */
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Modern CLS Fix: Reserves exact 16:9 space immediately before load */
.iframe_wrapper {
  position: relative;
  width: 100% !important;
  max-width: 100% !important; /* Safety constraint */
  aspect-ratio: 16 / 9; 
  border-radius: 8px;
  overflow: hidden !important; /* Prevents internal elements from busting out */
}

/* Fallback for very old browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .iframe_wrapper {
    height: 0;
    padding-bottom: 56.25%;
  }
}

/* Forces videos to map strictly to the wrapper */
.oembed_container_iframe,
.embed_container iframe,
.embed_container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border: none;
  border-radius: 8px; 
}

.oembed_custom-thumbnail,
.oembed_custom-thumbnail:hover,
.oembed_custom-thumbnail:focus,
.oembed_custom-thumbnail:active {
  appearance: none;
  background-color: transparent;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  border: none;
  display: block; 
  height: 100%;
  left: 0;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 2;
  border-radius: 8px; 
}

/* Anti-stretch layout and offset positioning applied */
.oembed_custom-thumbnail_icon {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  
  /* Target left-aligned position */
  left: 23.5%; 
  top: 50%;
  transform: translate(-50%, -50%); 
  
  /* Bulletproof Circle Fixes */
  width: clamp(60px, 12vw, 100px) !important; 
  height: clamp(60px, 12vw, 100px) !important;
  aspect-ratio: 1 / 1 !important; 
  flex-shrink: 0 !important; 
  
  background-color: #00AAE5;
  border-radius: 50% !important;
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out; 
}

.oembed_custom-thumbnail_icon svg {
  display: block;
  height: auto !important;
  width: 35% !important; 
  margin-left: 5%; 
  transition: fill 0.2s ease-in-out;
}

.oembed_custom-thumbnail:hover .oembed_custom-thumbnail_icon {
  background-color: #DFAE59; 
  transform: translate(-50%, -50%) scale(1.15); 
}

.oembed_custom-thumbnail:hover .oembed_custom-thumbnail_icon svg {
  fill: #2B2E34 !important; 
}

.oembed_custom-thumbnail--hide {
  display: none !important;
}

/* Modernized accessible hiding to prevent 1px margin blowout issues on some devices */
.oembed-info {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Placeholder styles */
:not(.hs-inline-edit) .hs-video-placeholder {
  display: none;
}

.hs-inline-edit .hs-video-placeholder {
  background-color: #f5f8fa !important;
  border: 1px dashed #516f90 !important;
  display: block !important;
  font-size: 14px !important;
  margin: 2px 1px !important;
  outline: 1px dashed #fff !important;
  text-align: center !important;
}

.hs-video-placeholder > * {
  box-sizing: border-box !important;
  display: block !important;
  margin: 1px !important;
  padding: 12px !important;
  width: calc(100% - 2px) !important;
}

p.hs-video-placeholder__title {
  color: #7c98b6 !important;
  font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif !important;
  font-size: 14px !important;
  font-style: italic !important;
  font-weight: 700 !important;
  line-height: initial !important;
  margin-bottom: 10px !important;
  margin-top: 0 !important;
  padding: 0 !important;
  text-shadow: 0 -1px 0 hsla(0,0%,100%,.5) !important;
}

p.hs-video-placeholder__description {
  color: #7c98b6 !important;
  font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
  text-shadow: 0 -1px 0 hsla(0,0%,100%,.5) !important;
}