.mmp-video {
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--mmp-video-ratio, 16 / 9);
  margin-inline: auto;
  background: #000;
}

.mmp-video--responsive {
  width: 100%;
  max-width: var(--mmp-video-width, 960px);
}

.mmp-video--fixed {
  width: var(--mmp-video-width, 960px);
  max-width: 100%;
}

.mmp-video iframe,
.mmp-video video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.mmp-video-placeholder {
  box-sizing: border-box;
  max-width: 100%;
  margin-inline: auto;
}

.mmp-video.mmp-video--floating {
  position: fixed;
  z-index: 999999;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: min(400px, calc(100vw - 32px));
  max-width: none;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.38);
}

.mmp-video__floating-controls {
  position: absolute;
  z-index: 4;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}

.mmp-video__floating-controls[hidden] {
  display: none;
}

.mmp-video__floating-button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.76);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  place-items: center;
}

.mmp-video__floating-button:hover {
  background: rgba(0, 0, 0, 0.92);
}

.mmp-video__floating-button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.mmp-video__floating-toggle span {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid currentColor;
}

.mmp-video__floating-toggle.is-playing span {
  width: 10px;
  height: 12px;
  margin-left: 0;
  border: 0;
  border-right: 3px solid currentColor;
  border-left: 3px solid currentColor;
}

.mmp-video__floating-close span::before,
.mmp-video__floating-close span::after {
  position: absolute;
  top: 17px;
  left: 10px;
  width: 14px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  content: '';
}

.mmp-video__floating-close span::before {
  transform: rotate(45deg);
}

.mmp-video__floating-close span::after {
  transform: rotate(-45deg);
}

.mmp-video__cover {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #000;
  cursor: pointer;
}

.mmp-video__cover[hidden] {
  display: none;
}

.mmp-video__cover:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -6px;
}

.mmp-video__cover:disabled {
  cursor: wait;
}

.mmp-video__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mmp-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.72);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
}

.mmp-video__play::after {
  position: absolute;
  top: 50%;
  left: 52%;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 18px solid #fff;
  content: '';
  transform: translate(-40%, -50%);
}

@media (max-width: 480px) {
  .mmp-video.mmp-video--floating {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }

  .mmp-video__play {
    width: 56px;
    height: 56px;
  }
}
