.ovideo-player {
  --ovideo-radius: 16px;
  --ovideo-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  --ovideo-width-small: 220px;
  --ovideo-width-large: 360px;
  --ovideo-width-small-mobile: 180px;
  --ovideo-width-large-mobile: 320px;
  --ovideo-aspect-ratio: 16 / 9;
  --ovideo-bottom: 20px;
  color: #111;
  box-sizing: border-box;
}

.ovideo-player *,
.ovideo-player *::before,
.ovideo-player *::after {
  box-sizing: border-box;
}

.ovideo-player--embed {
  max-width: 820px;
  width: 100%;
  background: #000;
  border-radius: var(--ovideo-radius);
  overflow: hidden;
}

.ovideo-player--floating {
  position: fixed;
  width: min(var(--ovideo-width-large), calc(100vw - 24px));
  z-index: 9999;
  background: #fff;
  border-radius: var(--ovideo-radius);
  box-shadow: var(--ovideo-shadow);
  overflow: hidden;
  transition: width 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.ovideo-player--floating.is-minimized {
  width: min(var(--ovideo-width-small), calc(100vw - 24px));
}

.ovideo-player--right {
  right: 20px;
  bottom: var(--ovideo-bottom);
}

.ovideo-player--left {
  left: 20px;
  bottom: var(--ovideo-bottom);
}

.ovideo-player--floating.is-centered {
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: min(var(--ovideo-width-large), calc(100vw - 32px));
  transform: translate(-50%, -50%);
  z-index: 10001;
}

.ovideo-player--floating.is-dragging {
  transition: none;
}

.ovideo-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10000;
}

.ovideo-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.ovideo-floating__chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #111;
  color: #fff;
  user-select: none;
  touch-action: none;
  cursor: default;
}

.ovideo-player--floating[data-draggable="1"] .ovideo-floating__chrome {
  cursor: grab;
}

.ovideo-player--floating.is-dragging .ovideo-floating__chrome {
  cursor: grabbing;
}

.ovideo-floating__title {
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ovideo-floating__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.ovideo-floating__btn,
.ovideo-control-btn,
.ovideo-launch {
  border: 0;
  cursor: pointer;
}

.ovideo-floating__btn {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.ovideo-stage {
  position: relative;
  background: #000;
  aspect-ratio: var(--ovideo-aspect-ratio);
}

.ovideo-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.ovideo-launch {
  position: absolute;
  inset: 0;
  padding: 0;
  background: transparent;
}

.ovideo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
}

.ovideo-play-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.ovideo-play-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.ovideo-custom-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #ececec;
}

.ovideo-control-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
}

.ovideo-control-icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.ovideo-control-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ovideo-control-icon svg path,
.ovideo-control-icon svg rect,
.ovideo-control-icon svg circle,
.ovideo-control-icon svg line,
.ovideo-control-icon svg polyline {
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ovideo-control-icon svg rect[fill],
.ovideo-control-icon svg path[fill="currentColor"] {
  stroke: none;
}

.ovideo-player--floating.is-minimized .ovideo-floating__title {
  max-width: 120px;
}

.ovideo-missing {
  padding: 12px 14px;
  border: 1px solid #dcdcde;
  background: #fff8e5;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .ovideo-player--floating {
    width: min(var(--ovideo-width-large), calc(100vw - 20px));
  }

  .ovideo-player--floating.is-minimized {
    width: min(var(--ovideo-width-small), calc(100vw - 20px));
  }
}

.ovideo-player--floating.is-minimized .ovideo-custom-controls {
  display: none;
}

@media (max-width: 767px) {
  .ovideo-player--floating {
    width: min(var(--ovideo-width-large-mobile), calc(100vw - 16px));
  }

  .ovideo-player--floating.is-minimized {
    width: min(var(--ovideo-width-small-mobile), calc(100vw - 16px));
  }

  .ovideo-player--floating.is-centered {
    width: min(var(--ovideo-width-large-mobile), calc(100vw - 16px));
  }
}
