/* Product description videos: pop-out / theatre / full screen (see js/ift-video-player.js) */
.ivp-btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ivp-btn svg .ivp-fill { fill: currentColor; stroke: none; }

/* Toolbar under each inline video */
.ivp-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}
.ivp-tools[hidden] { display: none; }
.ivp-tools .ivp-btn,
.ivp-placeholder .ivp-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font: 600 13px/1.2 inherit;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.ivp-tools .ivp-btn:hover,
.ivp-placeholder .ivp-btn:hover {
  border-color: #0f766e;
  color: #0f766e;
  box-shadow: 0 2px 8px rgba(15, 118, 110, .15);
}
.ivp-tools .ivp-btn:focus-visible,
.ivp-placeholder .ivp-btn:focus-visible,
.ivp-bar .ivp-btn:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

/* Space left behind while the video is popped out */
.ivp-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 16px;
  box-sizing: border-box;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  text-align: center;
}
.ivp-placeholder[hidden] { display: none; }
.ivp-placeholder p { margin: 0; color: #475569; font-size: 14px; }

/* Title bar + resize handles (only visible when floating / theatre) */
.ivp-bar,
.ivp-handle { display: none; }

.ivp-host.ivp-is-float,
.ivp-host.ivp-is-modal {
  z-index: 100050 !important;
  visibility: visible !important;
  box-shadow: 0 18px 50px rgba(2, 6, 23, .45), 0 0 0 1px rgba(148, 163, 184, .25) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  background: #0f172a !important;
  box-sizing: border-box !important;
}
.ivp-host.ivp-is-float > iframe,
.ivp-host.ivp-is-modal > iframe {
  top: 40px !important;
  bottom: auto !important;
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  height: calc(100% - 40px) !important;
}

.ivp-is-float > .ivp-bar,
.ivp-is-modal > .ivp-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  padding: 0 4px 0 6px;
  box-sizing: border-box;
  background: #0f172a;
  color: #e2e8f0;
  cursor: move;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.ivp-bar__title {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
}
.ivp-bar__title svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: #64748b;
  stroke-width: 3;
  stroke-linecap: round;
}
.ivp-bar__title span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ivp-bar .ivp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
}
.ivp-bar .ivp-btn[hidden] { display: none; }
.ivp-bar .ivp-btn:hover { background: rgba(148, 163, 184, .2); color: #fff; }
.ivp-bar .ivp-btn--dock:hover { background: #dc2626; color: #fff; }
.ivp-bar .ivp-btn--dock span { display: none; }
.ivp-is-modal .ivp-bar .ivp-btn--dock {
  width: auto;
  gap: 6px;
  margin-left: 6px;
  padding: 0 12px 0 10px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font: 600 13px/1 inherit;
  font-family: inherit;
}
.ivp-is-modal .ivp-bar .ivp-btn--dock span { display: inline; }

.ivp-is-float > .ivp-handle,
.ivp-is-modal > .ivp-handle {
  display: block;
  position: absolute;
  width: 16px;
  height: 16px;
  z-index: 2;
  touch-action: none;
}
.ivp-handle--sw { bottom: 0; left: 0; cursor: nesw-resize; }
.ivp-handle--se { bottom: 0; right: 0; cursor: nwse-resize; }
.ivp-is-float > .ivp-handle--se::after,
.ivp-is-modal > .ivp-handle--se::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(255, 255, 255, .85);
  border-bottom: 2px solid rgba(255, 255, 255, .85);
  border-bottom-right-radius: 3px;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8));
  pointer-events: none;
}
.ivp-is-float > .ivp-handle--sw::after,
.ivp-is-modal > .ivp-handle--sw::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border-left: 2px solid rgba(255, 255, 255, .85);
  border-bottom: 2px solid rgba(255, 255, 255, .85);
  border-bottom-left-radius: 3px;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, .8));
  pointer-events: none;
}

/* Keep the pointer out of the YouTube iframe while dragging/resizing */
.ivp-dragging iframe { pointer-events: none !important; }
.ivp-dragging, .ivp-dragging * { user-select: none !important; -webkit-user-select: none !important; }
.ivp-active-drag { transition: none !important; }

.ivp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100040;
  background: rgba(2, 6, 23, .82);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.ivp-tools { container-type: inline-size; }
@container (max-width: 340px) {
  .ivp-tools { flex-wrap: nowrap; gap: 6px; }
  .ivp-tools .ivp-btn { flex: 1 1 auto; justify-content: center; padding: 7px 8px; font-size: 12.5px; white-space: nowrap; }
  .ivp-tools .ivp-btn svg { display: none; }
}

@media (max-width: 575px) {
  .ivp-is-float > .ivp-handle,
  .ivp-is-modal > .ivp-handle { width: 24px; height: 24px; }
}
