/**
 * Obfuscation Overlay Styles
 * Styles for locked/obfuscated scan results and unlock UI
 */

/* Smooth fade-in animation for obfuscation overlay */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.obfuscation-overlay {
    animation: fadeInUp 0.5s ease-out;
}

/* Pulsing lock icon animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.unlock-icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Redacted text effect (alternative to ████) */
.redacted {
    background: linear-gradient(90deg, #d1d5db, #9ca3af, #d1d5db);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    color: transparent;
    border-radius: 4px;
    display: inline-block;
    min-width: 60px;
    height: 1em;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Gradient border animation for unlock section */
@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient-border {
    position: relative;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe) border-box;
    background-size: 400% 400%;
    animation: gradientBorder 3s ease infinite;
}

/* Credit package buttons hover effect */
.credit-package-btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.credit-package-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.credit-package-btn:hover::before {
    width: 300px;
    height: 300px;
}

.credit-package-btn:active {
    transform: scale(0.95);
}

/* Purchase ID input styling */
#purchaseIdInput {
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

#purchaseIdInput:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

#purchaseIdInput::placeholder {
    letter-spacing: 2px;
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .credit-package-btn {
        padding: 12px 16px;
    }

    #purchaseIdInput {
        font-size: 18px;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success checkmark animation */
@keyframes checkmark {
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(45deg);
        opacity: 1;
    }
}

.success-checkmark {
    animation: checkmark 0.5s ease-out;
}

/* Blur overlay for obfuscated content (if needed) */
.content-blur {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
}

/* Locked badge pulse */
.locked-badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Obfuscated text - visible blur effect */
.obfuscated-text {
    display: inline-block;
    color: transparent;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
    background: linear-gradient(90deg,
        rgba(209, 213, 219, 0.4) 0%,
        rgba(156, 163, 175, 0.6) 25%,
        rgba(209, 213, 219, 0.4) 50%,
        rgba(156, 163, 175, 0.6) 75%,
        rgba(209, 213, 219, 0.4) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
    padding: 4px 12px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
    user-select: none;
    pointer-events: none;
    filter: blur(4px);
    font-weight: 600;
}

/* Smaller obfuscated text for summary items */
.summary-item .obfuscated-text {
    min-width: 50px;
    padding: 2px 8px;
    font-size: 0.9em;
    filter: blur(3px);
}

/* Shimmer animation for obfuscated text */
@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Locked table rows - subtle gradient background */
.locked-row {
    background: linear-gradient(90deg,
        rgba(147, 51, 234, 0.02) 0%,
        rgba(59, 130, 246, 0.04) 50%,
        rgba(147, 51, 234, 0.02) 100%
    );
    transition: background 0.3s ease;
}

.locked-row:hover {
    background: linear-gradient(90deg,
        rgba(147, 51, 234, 0.05) 0%,
        rgba(59, 130, 246, 0.08) 50%,
        rgba(147, 51, 234, 0.05) 100%
    );
}

/* Preview locked rows - entire row blur (no animations) */
.preview-locked-row {
    position: relative;
    filter: blur(5px);
    user-select: none;
    pointer-events: none;
    background: linear-gradient(90deg,
        rgba(147, 51, 234, 0.03) 0%,
        rgba(59, 130, 246, 0.05) 50%,
        rgba(147, 51, 234, 0.03) 100%
    );
}

.preview-locked-row::after {
    content: '🔒';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.6;
    filter: blur(0);
}


/* Unlock overlay - positioned over the blurred rows */
.unlock-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    pointer-events: none;
}

.unlock-overlay > div {
    pointer-events: auto;
    max-width: 800px;
    width: 100%;
}
