:root { --flpYTP-pad: 16px; --flpYTP-radius: 18px; --flpYTP-bar: 44px; }

.flp-ytp { position: fixed; inset: 0; z-index: 999999; display: none; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.flp-ytp.is-open { display: block; }

.flp-ytp__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(2px); }

.flp-ytp__panel {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 980px); max-height: calc(92vh - 24px);
  background: #000; border-radius: var(--flpYTP-radius); overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.45); display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,.08);
}

.flp-ytp__bar { height: var(--flpYTP-bar); display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 12px; background: rgba(16, 16, 16, .72); }
.flp-ytp__title { color: rgba(255,255,255,.92); font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.flp-ytp__actions { display:flex; gap: 6px; }

.flp-ytp__btn {
  appearance: none; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08); color: rgba(255,255,255,.92);
  width: 36px; height: 30px; border-radius: 10px; cursor: pointer;
  line-height: 1; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.flp-ytp__btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }
.flp-ytp__btn:active { transform: translateY(0); }
.flp-ytp__btn--danger { background: rgba(255, 40, 40, .15); border-color: rgba(255, 40, 40, .35); }
.flp-ytp__btn--danger:hover { background: rgba(255, 40, 40, .22); border-color: rgba(255, 40, 40, .45); }

.flp-ytp__playerWrap { width: 100%; aspect-ratio: 16 / 9; background: #000; flex: 1; min-height: 220px; }
.flp-ytp__player { width: 100%; height: 100%; }
.flp-ytp__noscript { color:#fff; padding:12px; background:#111; }

@media (prefers-reduced-motion: no-preference) {
  .flp-ytp__panel { transition: transform .32s ease, width .32s ease, right .32s ease, bottom .32s ease, top .32s ease, left .32s ease; }
  .flp-ytp__overlay { transition: opacity .22s ease; }
}

.flp-ytp.is-minimized { pointer-events: none; }
.flp-ytp.is-minimized .flp-ytp__overlay { opacity: 0; }
.flp-ytp.is-minimized .flp-ytp__panel {
  pointer-events: auto; position: fixed; left: auto; top: auto;
  right: var(--flpYTP-pad); bottom: var(--flpYTP-pad);
  transform: none; width: min(360px, calc(100vw - (var(--flpYTP-pad) * 2)));
  max-height: none; box-shadow: 0 18px 60px rgba(0,0,0,.55);
}
.flp-ytp.is-minimized .flp-ytp__playerWrap { min-height: 160px; }

.flp-ytp:not(.is-minimized) [data-flp-ytp-action="expand"] { display:none; }
.flp-ytp.is-minimized [data-flp-ytp-action="minimize"] { display:none; }

.flp-ytp iframe { display:block; }
