/* ============================================================
   Tutor LMS Video Watermark – Overlay Styles
   ============================================================ */

/* The overlay sits on top of the player wrapper */
.tutor-wm-host {
    position: relative !important;
    overflow: visible !important; /* changed from hidden so fullscreen child is not clipped */
}

.tutor-wm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Fullscreen fix ──────────────────────────────────────────
   When ANY ancestor element enters fullscreen, the watermark
   overlay must also stretch to fill the fullscreen viewport.
   :fullscreen targets the element that was made fullscreen;
   we re-anchor the overlay inside it.
   ----------------------------------------------------------- */
:fullscreen .tutor-wm-overlay,
:-webkit-full-screen .tutor-wm-overlay,
:-moz-full-screen .tutor-wm-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2147483647 !important; /* max z-index */
}

/* The watermark label */
.tutor-wm-label {
    position: absolute;
    display: block;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    /* Stronger shadow for better readability on any background */
    text-shadow:
        0 0 8px rgba(0, 0, 0, 0.9),
        0 2px 6px rgba(0, 0, 0, 0.8),
        0 1px 2px rgba(0, 0, 0, 1);
    transition: top 1.2s ease, left 1.2s ease, transform 1.2s ease;
    pointer-events: none;
    /* Subtle background pill for extra contrast */
    background: rgba(0, 0, 0, 0.28);
    padding: 4px 10px;
    border-radius: 4px;
}

/* Diagonal "tiled" mode */
.tutor-wm-overlay.diagonal-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.tutor-wm-overlay.diagonal-mode .tutor-wm-label {
    position: static;
    transform: rotate(-30deg);
    margin: 10% auto;
    white-space: nowrap;
}

/* Blur overlay when video is paused */
.tutor-wm-host.wm-paused .tutor-wm-blur-shield {
    opacity: 1;
    visibility: visible;
}

.tutor-wm-blur-shield {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.35);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutor-wm-blur-shield::after {
    content: "▶ Click to Resume";
    color: rgba(255, 255, 255, 0.85);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    pointer-events: none;
}

/* Fade-in animation for initial appearance */
@keyframes tutor-wm-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.tutor-wm-label.wm-visible {
    animation: tutor-wm-fadein 0.8s ease forwards;
}
