.wistia-ish {
  --brand-green: #4c9e00;
  --brand-green-dark: #004e00;
  --control-height: 32px;
  --control-icon-size: 20px;

  width: min(100%, 464px);
  color: #fff;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.wistia-ish,
.wistia-ish * {
  box-sizing: border-box;
}

/* --- isolation (strong) but does NOT force visibility --- */

/* Buttons: strip theme padding/border/font quirks */
.wistia-ish button {
  font: inherit;
  line-height: 1;
  text-transform: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
}

/* Icons: lock sizing only (NO display here) */
.wistia-ish .icon {
  width: var(--control-icon-size);
  height: var(--control-icon-size);
}

/* SVG sizing: lock sizing only (NO display here) */
.wistia-ish .icon svg,
.wistia-ish svg.icon {
  width: 100%;
  height: 100%;
}

/* Optional: avoid theme forcing svg to fill via max-width */
.wistia-ish svg {
  max-width: none;
}

/* stronger isolation for WP theme collisions */
.wistia-ish,
.wistia-ish * {
  font-size: inherit;
  line-height: inherit;
}

.wistia-ish .icon-btn {
  padding: 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.wistia-ish .icon {
  width: var(--control-icon-size) !important;
  height: var(--control-icon-size) !important;
}

.wistia-ish .settings .icon,
.wistia-ish .play .icon,
.wistia-ish .mute .icon {
  width: 16px !important;
  height: 16px !important;
}

/* stop global svg rules from messing with icon SVGs */
.wistia-ish .icon svg,
.wistia-ish svg.icon {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  overflow: visible;
}

/* if a theme sets svg { fill: ... } and ruins stroke icons */
.wistia-ish svg {
  fill: none;
}

.wistia-ish .video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.wistia-ish .yt,
.wistia-ish .yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wistia-ish .interaction-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}

.wistia-ish .big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 58px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 4;
}

.wistia-ish .big-play-bg {
  position: absolute;
  inset: 0;
  background: rgba(76, 158, 0, 0.7);
}

.wistia-ish .big-play::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-green);
  mix-blend-mode: darken;
}

.wistia-ish .big-play-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wistia-ish .bottom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--control-height);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  z-index: 5;
  background: rgba(76, 158, 0, 0.85);
  transition: opacity 180ms ease, transform 180ms ease;
}

.wistia-ish.is-controls-hidden .bottom-bar {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.wistia-ish .icon-btn {
  width: 36px;
  height: var(--control-height);
  border: 0;
  padding: 0;
  display: grid;
  place-items: center;
  background: transparent;
  cursor: pointer;
}

.wistia-ish .icon-btn:hover {
  background: var(--brand-green-dark);
}

.wistia-ish .icon {
  width: var(--control-icon-size);
  height: var(--control-icon-size);
  display: block;
  pointer-events: none;
}

.wistia-ish .settings .icon {
  width: 16px;
  height: 16px;
}

.wistia-ish .play .icon,
.wistia-ish .mute .icon {
  width: 16px;
  height: 16px;
}

.wistia-ish .time {
  width: 46px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.35px;
  user-select: none;
}

.wistia-ish .scrub-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.wistia-ish .scrub {
  width: 100%;
  height: var(--control-height);
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.wistia-ish .scrub::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.wistia-ish .scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  margin-top: -4px;
}

.wistia-ish .scrub::-moz-range-track {
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
}

.wistia-ish .scrub::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.wistia-ish .volume-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.wistia-ish .volume-panel {
  position: absolute;
  right: 0;
  bottom: 100%;
  width: 34px;
  height: 108px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.7);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 140ms ease 200ms, transform 140ms ease 200ms, visibility 0s linear 340ms;
}

.wistia-ish .volume-wrap:hover .volume-panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s, 0s, 0s;
}

.wistia-ish .volume-slider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  width: 16px;
  height: 88px;
  margin: 0;
  writing-mode: vertical-lr;
  direction: rtl;
  cursor: pointer;
}

.wistia-ish .mute .volume-off {
  display: none;
}

.wistia-ish.is-muted .mute .volume-on {
  display: none;
}

.wistia-ish.is-muted .mute .volume-off {
  display: block;
}

.wistia-ish .play .pause-ic {
  display: none;
}

.wistia-ish.is-playing .play .pause-ic {
  display: block;
}

.wistia-ish.is-playing .play .play-ic {
  display: none;
}

.wistia-ish .settings-wrap {
  position: relative;
}

.wistia-ish .menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 150px;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.88);
}

.wistia-ish .menu button {
  width: 100%;
  border: 0;
  padding: 8px 10px;
  text-align: left;
  background: transparent;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.wistia-ish .menu button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.wistia-ish .menu button.active {
  background: rgba(76, 158, 0, 0.55);
}

.wistia-ish.is-playing .big-play {
  display: none;
}

@media (max-width: 520px) {
  .wistia-ish {
    --control-height: 32px;
  }

  .wistia-ish .icon-btn {
    width: 34px;
  }

  .wistia-ish .time {
    width: 44px;
    font-size: 11px;
  }
}
