.rc-inline-video {
  position: relative;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: var(--rc-video-ratio, 16 / 9);
  border-radius: var(--rc-video-radius, .65rem);
  background: var(--rc-video-background, #142331);
}

.rc-inline-video > .rc-inline-video-trigger {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.rc-inline-video > .rc-inline-video-trigger {
  display: grid;
  place-items: center;
  background: transparent;
  text-decoration: none;
}

.rc-inline-video > .rc-inline-video-trigger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: -5px;
  box-shadow: inset 0 0 0 7px #142331;
}

.rc-inline-video-trigger > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: var(--rc-video-fit, cover);
}

.rc-inline-video-trigger > img[hidden] { display: none; }

.rc-inline-video-play {
  z-index: 1;
  display: grid;
  width: clamp(2.65rem, 4.8vw, 3.6rem);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #dce8e7;
  border-radius: 50%;
  color: #143c44;
  background: #f4f8f6;
  box-shadow: 0 .15rem .7rem #0007;
}

.rc-inline-video-play::after {
  width: 0;
  height: 0;
  margin-inline-start: .2rem;
  border-block: .36rem solid transparent;
  border-inline-start: .6rem solid currentColor;
  content: "";
}

.rc-inline-video-trigger:hover .rc-inline-video-play { background: #fff; }
.rc-video-redundant { display: none !important; }

a.rc-video-open {
  display: inline-grid;
  width: 3rem;
  min-height: 3rem;
  place-items: center;
  border-radius: 50%;
}

.rc-video-open > .rc-inline-video-play { width: 3rem; }

.rc-video-preview-frame { position: relative; min-width: 0; }

button.rc-video-native-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

[data-case-video-loop] + button.rc-video-native-trigger {
  inset: .65rem .65rem auto auto;
  width: 3rem;
  border-radius: 50%;
}

[data-case-video-loop] + .rc-video-native-trigger > .rc-inline-video-play { width: 3rem; }

.rc-video-native-trigger:hover > .rc-inline-video-play,
.rc-video-open:hover > .rc-inline-video-play { background: #fff; }

.rc-video-native-trigger:focus-visible,
.rc-video-open:focus-visible {
  outline: 3px solid #75e6fb;
  outline-offset: 2px;
}

.rc-video-dialog {
  --rc-player-ratio: 1.7778;
  width: min(84rem, calc(100vw - 1.25rem), calc((100dvh - 5rem) * var(--rc-player-ratio)));
  max-width: none;
  max-height: none;
  padding: 0;
  margin: auto;
  overflow: hidden;
  border: 1px solid #6d7a8c;
  border-radius: .8rem;
  color: #fff;
  background: #10141d;
  box-shadow: 0 1.25rem 5rem #000b;
}

.rc-video-dialog::backdrop { background: rgb(4 6 11 / 88%); }

html:has(.rc-video-dialog[open]) { overflow: hidden; }

.rc-video-dialog-controls {
  display: flex;
  justify-content: end;
  gap: .4rem;
  padding: .35rem;
}

.rc-video-dialog-controls > :is(a, button):not([hidden]) {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #778399;
  border-radius: .45rem;
  color: #fff;
  background: #242d3b;
  font: 500 1.5rem/1 system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.rc-video-dialog-controls > :is(a, button):hover { background: #354155; }
.rc-video-dialog-controls > :is(a, button):focus-visible { outline: 2px solid #83e9ff; outline-offset: 2px; }

.rc-video-dialog-player {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: var(--rc-player-ratio);
  background: #000;
}

.rc-video-dialog-player > :is(video, iframe) {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

.rc-video-dialog-error { padding: 1rem; }

.rc-inline-video-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: inherit;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}
