/* Normalized containers: Blocks overflow and removes inline layout shifts */
.oembed_container,
.embed_container {
  display: block;
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: clamp(1.5rem, 4vw, 3rem) auto;
  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; /* Ensures padding/borders don't trigger horizontal scroll */
}

/* Modern CLS Fix: Reserves exact 16:9 space immediately before load */
.iframe_wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; 
  border-radius: 8px;
  overflow: hidden; 
}

/* 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, ignoring HubSpot's inline sizes */
.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; 
}

.oembed_custom-thumbnail_icon {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 23.5%; 
  top: 50%;
  transform: translate(-50%, -50%) scale(1); 
  width: clamp(60px, 12vw, 100px); 
  height: clamp(60px, 12vw, 100px);
  background-color: #00AAE5;
  border-radius: 50%;
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out; 
}

.oembed_custom-thumbnail_icon svg {
  display: block;
  height: auto;
  width: 35%; 
  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; 
}

_:-ms-fullscreen, :root .oembed_custom-thumbnail_icon svg {
  max-width: none;
}

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

/* FIXED: Replaced the left: -10000px hack with standard invisible clipping to stop mobile blowout */
.oembed-info {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* 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;
}