/**
 * Smart Content Overlay with Ad Lock - Frontend Styles
 * Version: 3.0.0
 */

/* Ensure parent elements can have overlays */
.sco-covered {
    position: relative !important;
}

/* Container is locked - block all interactions */
.sco-container-locked {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    touch-action: none !important; /* Prevent all touch gestures on mobile */
    -ms-touch-action: none !important;
}

/* Locked links - visual indication */
.sco-link-locked {
    pointer-events: none !important;
    cursor: not-allowed !important;
    touch-action: none !important;
}

/* Overlay container - MUST capture all pointer events when locked */
.sco-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 999999 !important;
    pointer-events: auto !important; /* CHANGED: Must capture clicks to block them */
    transition: opacity 0.3s ease;
    cursor: not-allowed !important;
}

/* When overlay is locked, it blocks everything */
.sco-overlay.sco-locked {
    pointer-events: auto !important;
    cursor: not-allowed !important;
    touch-action: none !important; /* Block all touch gestures */
    -ms-touch-action: none !important;
}

/* When overlay is unlocked, it doesn't block */
.sco-overlay.sco-unlocked {
    pointer-events: none !important;
    cursor: default !important;
    touch-action: auto !important;
}

/* Overlay text/button */
.sco-overlay-text {
    padding: 10px 20px !important;
    border-radius: 5px !important;
    color: #ffffff !important;
    font-weight: bold !important;
    text-align: center !important;
    white-space: nowrap !important;
    pointer-events: none !important; /* Text itself doesn't need clicks */
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    line-height: 1.4 !important;
    display: inline-block !important;
    max-width: 90% !important;
    word-wrap: break-word !important;
    white-space: normal !important;
}

/* Physical iframe blocker - prevents all iframe interaction during lock */
.sco-iframe-blocker {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999998 !important;
    background: transparent !important;
    pointer-events: auto !important;
    cursor: not-allowed !important;
}

/* Countdown active state - add pulsing animation */
.sco-overlay-text.sco-countdown-active {
    animation: sco-pulse 2s ease-in-out infinite;
    font-family: 'Courier New', monospace !important;
    letter-spacing: 1px !important;
}

/* Pulse animation for countdown */
@keyframes sco-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Special styling for small overlays */
.sco-overlay-text[style*="font-size: 10px"],
.sco-overlay-text[style*="font-size: 11px"],
.sco-overlay-text[style*="font-size: 12px"] {
    padding: 6px 12px !important;
}

/* Special styling for large overlays */
.sco-overlay-text[style*="font-size: 16px"],
.sco-overlay-text[style*="font-size: 18px"] {
    padding: 12px 24px !important;
}

/* Ensure overlays work with AdSense */
ins.adsbygoogle .sco-overlay {
    position: absolute !important;
}

/* Ensure overlays display over iframes */
.sco-overlay {
    mix-blend-mode: normal !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sco-overlay-text {
        padding: 8px 16px !important;
    }
}

@media (max-width: 480px) {
    .sco-overlay-text {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

/* Print: hide overlays */
@media print {
    .sco-overlay {
        display: none !important;
    }
}
