/* Luminal CMS — Floating Video Player + PiP Styles */

#floating-video-modal {
    position: fixed;
    width: 320px;
    height: 180px;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    overflow: hidden;
    resize: both;
    min-width: 240px;
    min-height: 112px;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    cursor: grab;
}

/* ── Header bar ── */
#floating-video-modal .fv-header {
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    cursor: grab;
    flex-shrink: 0;
    gap: 6px;
}

#floating-video-modal .fv-title {
    font-size: 0.78em;
    font-weight: bold;
    user-select: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* ── Controls group (vol + pip + close) ── */
#floating-video-modal .fv-controls {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

#floating-video-modal .fv-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    padding: 0 3px;
    transition: color 0.2s;
}

/* ── Mute button ── */
#floating-video-modal .fv-mute-btn {
    font-size: 0.9em;
}
#floating-video-modal .fv-mute-btn:hover {
    color: #38bdf8;
}

/* ── Volume slider ── */
#floating-video-modal .fv-volume {
    width: 50px;
    height: 3px;
    cursor: pointer;
    accent-color: #38bdf8;
    -webkit-appearance: none;
    appearance: none;
    background: #555;
    border-radius: 2px;
    outline: none;
}
#floating-video-modal .fv-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38bdf8;
    cursor: pointer;
}
#floating-video-modal .fv-volume::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38bdf8;
    border: none;
    cursor: pointer;
}

/* ── PiP button ── */
#floating-video-modal .fv-pip-btn {
    font-size: 1.05em;
}
#floating-video-modal .fv-pip-btn:hover {
    color: #38bdf8;
}

/* PiP pulse animation — invites re-entry after page nav */
#floating-video-modal .fv-pip-pulse {
    animation: fv-pulse 0.6s ease-in-out 5;
}
@keyframes fv-pulse {
    0%, 100% { color: #fff; transform: scale(1); }
    50%      { color: #38bdf8; transform: scale(1.3); }
}

/* ── Close button ── */
#floating-video-modal .fv-close-btn {
    font-size: 1.3em;
}
#floating-video-modal .fv-close-btn:hover {
    color: #f00;
}

/* ── PiP active state (dim modal when video is in OS window) ── */
#floating-video-modal.fv-pip-active .fv-content {
    opacity: 0.3;
}
#floating-video-modal.fv-pip-active .fv-content::after {
    content: 'Playing in PiP';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 0.85em;
    font-weight: 600;
    pointer-events: none;
}

/* ── Video content area ── */
#floating-video-modal .fv-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

#floating-video-modal video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* ── Page-level Float / PiP buttons ── */
.vf-btn-wrap {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.float-player-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.82em;
    font-weight: 600;
    transition: background-color 0.2s;
    display: inline-block;
}

.float-player-btn:hover {
    background-color: #0056b3;
}

.pip-player-btn {
    background-color: #7c3aed;
}

.pip-player-btn:hover {
    background-color: #5b21b6;
}
