/*
 * Video block - structural layout, plus the overlay/text colors below.
 * Those are set here (not left to the theme) because the color picker
 * fields are constrained to the theme.json palette, same approach used
 * for the hero block.
 *
 * The full-bleed media/overlay layers below are `position: absolute; inset: 0`
 * against __inner (not the block root) on purpose: an absolutely positioned
 * element's containing block is its nearest positioned ancestor's PADDING
 * box, so inset:0 fills straight to that ancestor's border edge regardless
 * of its own padding. Since responsive Padding Top/Bottom now lives on the
 * block root via the shared .wp-block-prontoblocks-section rule in
 * assets/css/blocks.css, the media layers would ignore that padding entirely
 * if they were positioned against the root - __inner exists so the padding
 * creates real visible space instead of being filled straight over.
 */

.wp-block-prontoblocks-video__inner {
  position: relative;
  overflow: hidden;
}

.wp-block-prontoblocks-video__inner--small {
  min-height: max(320px, 25vh);
}

.wp-block-prontoblocks-video__inner--medium {
  min-height: max(480px, 50vh);
}

.wp-block-prontoblocks-video__inner--large {
  min-height: max(720px, 75vh);
}

.wp-block-prontoblocks-video__inner--full {
  min-height: max(980px, 90vh);
}

.wp-block-prontoblocks-video__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #000;
}

.wp-block-prontoblocks-video__poster,
.wp-block-prontoblocks-video__video,
.wp-block-prontoblocks-video__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
}

/*
 * The poster sits behind the video/iframe by default paint order, but once
 * the video/iframe has a real source it should occlude the poster - simplest
 * is to just let it paint on top, which it does as the later sibling.
 */

.wp-block-prontoblocks-video__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 24px;
  border: 0;
  cursor: pointer;
  background-color: var(--prontoblocks-video-overlay-color, rgba(0, 0, 0, 0.4));
  transition: opacity 0.3s ease;
}

.wp-block-prontoblocks-video__overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.wp-block-prontoblocks-video__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  color: var(--prontoblocks-video-text-color, #fff);
}

.wp-block-prontoblocks-video__content--align-left {
  align-items: flex-start;
  text-align: left;
}

.wp-block-prontoblocks-video__content--align-center {
  align-items: center;
  text-align: center;
}

.wp-block-prontoblocks-video__content--align-right {
  align-items: flex-end;
  text-align: right;
}

.wp-block-prontoblocks-video__eyebrow {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wp-block-prontoblocks-video__title {
  display: block;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
}

.wp-block-prontoblocks-video__subheading {
  display: block;
  font-size: 1.125rem;
  line-height: 1.5;
}

.wp-block-prontoblocks-video__play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-top: 0.5rem;
}

.wp-block-prontoblocks-video__play-icon svg {
  width: 100%;
  height: 100%;
}
