/* Enhanced Drag & Drop Styling */
[id^="drop-zone-"] {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6 !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    text-align: center !important;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Hover state */
[id^="drop-zone-"]:hover {
    border-color: #00668c !important;
    background: linear-gradient(135deg, #e7f1ff 0%, #cce7ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.15);
}

/* Active drag over state */
[id^="drop-zone-"].bg-light {
    border-color: #198754 !important;
    background: linear-gradient(135deg, #d1eddb 0%, #a3d9a4 100%) !important;
    transform: scale(1.02);
    box-shadow: 0 12px 35px rgba(25, 135, 84, 0.2);
}

/* Animated background pattern */
[id^="drop-zone-"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 102, 140, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

[id^="drop-zone-"]:hover::before {
    opacity: 1;
}

/* Drag over animation */
[id^="drop-zone-"].bg-light::before {
    background: radial-gradient(circle, rgba(25, 135, 84, 0.1) 1px, transparent 1px);
    opacity: 1;
    animation: pulse-dots 1.5s ease-in-out infinite;
}

@keyframes pulse-dots {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Text styling inside drop zone */
[id^="drop-zone-"] p {
    margin: 0 !important;
    font-weight: 500;
    color: #6c757d;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1;
}

[id^="drop-zone-"]:hover p {
    color: #00668c;
}

[id^="drop-zone-"].bg-light p {
    color: #198754 !important;
    font-weight: 600;
}

/* Icon enhancement */
[id^="drop-zone-"]::after {
    content: '📁';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.3;
    transition: all 0.3s ease;
    pointer-events: none;
}

[id^="drop-zone-"]:hover::after {
    opacity: 0.6;
    transform: scale(1.1);
}

[id^="drop-zone-"].bg-light::after {
    content: '✅';
    opacity: 0.8;
    transform: scale(1.2);
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {

    0%,
    20%,
    53%,
    80%,
    100% {
        transform: scale(1.2);
    }

    40%,
    43% {
        transform: scale(1.4);
    }
}

/* File preview styling enhancement */
[id^="file-preview-"] {
    margin-top: 1rem !important;
}

[id^="file-preview-"] ul {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.5rem;
    border: 2px solid #00668c;
}

[id^="file-preview-"] li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    color: #495057;
}

[id^="file-preview-"] li:last-child {
    border-bottom: none;
}

/* Loading state animation */
.uploading [id^="drop-zone-"] {
    pointer-events: none;
    opacity: 0.7;
}

.uploading [id^="drop-zone-"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #00668c;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success state */
.upload-success [id^="drop-zone-"] {
    border-color: #198754 !important;
    background: linear-gradient(135deg, #d1eddb 0%, #a3d9a4 100%);
    animation: success-pulse 0.6s ease-out;
}

@keyframes success-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* Global Background Gradient */
.global-bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.12;
    will-change: transform;
    background: radial-gradient(ellipse 100vw 50vh at 5% 5%, var(--bs-primary, #6366f1), transparent 60%),
                radial-gradient(ellipse 80vw 40vh at 95% 10%, var(--bs-info, #06b6d4), transparent 65%),
                radial-gradient(ellipse 70vw 35vh at 50% 100%, var(--bs-warning, #f59e0b), transparent 70%);
}

/* Mobile-specific gradient optimization */
@media (max-width: 768px) {
    .global-bg-gradient {
        opacity: 0.08;
        background: radial-gradient(ellipse 120vw 60vh at 10% 10%, var(--bs-primary, #6366f1), transparent 70%),
                    radial-gradient(ellipse 100vw 50vh at 90% 20%, var(--bs-info, #06b6d4), transparent 75%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    [id^="drop-zone-"] {
        padding: 1.5rem !important;
    }

    [id^="drop-zone-"]::after {
        top: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
}

/* ========================================
   PROGRESSIVE DOCUMENT BLURRING SYSTEM
   ======================================== */

/* Blurred Document Content - MINIMAL BLUR (only content, not overlay) */
.blurred-doc-content {
    filter: blur(1px);
    opacity: 0.75;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Blur Overlay Enhancements - ABOVE THE BLUR */
.card-blur-overlay {
    cursor: pointer !important;
    pointer-events: all !important;
    transition: all 0.3s ease;
    border: 2px solid #ffc107;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,249,230,0.95) 100%) !important;
    backdrop-filter: none !important;
    box-shadow: 0 8px 30px rgba(255, 193, 7, 0.4);
    filter: none !important;
    z-index: 10 !important;
}

.card-blur-overlay:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 35px rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, rgba(255,255,255,1) 0%, rgba(255,249,230,0.98) 100%) !important;
    border-color: #ff9800;
    border-width: 3px;
}


/* Blur Title Styling */
.blur-title {
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.9;
}

/* Lock Icon Enhancement */
.blur-overlay .lock-icon {
    font-size: 2.5rem;
    color: #ffc107;
    margin-bottom: 1rem;
    opacity: 0.8;
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.3));
    animation: gentle-pulse 2s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Unlock Button Styling */
.blur-overlay .btn-unlock {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.blur-overlay .btn-unlock:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
    color: white;
}

.blur-overlay .btn-unlock:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

/* Shimmer effect for unlock button */
.blur-overlay .btn-unlock::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.blur-overlay .btn-unlock:hover::before {
    left: 100%;
}


/* Upgrade Modal Enhancements */
.upgrade-modal .modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.upgrade-modal .modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 20px 20px 0 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.upgrade-modal .package-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.upgrade-modal .package-preview:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

/* Progress Indicator for Blurred Documents */
.blur-progress {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 6;
}

/* Accessibility Enhancements */
.card-blur-overlay:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .blurred-doc-content {
        filter: blur(3px);
        opacity: 0.5;
    }

    .card-blur-overlay {
        background: rgba(255, 255, 255, 0.98) !important;
        border: 3px solid #000 !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .blurred-doc-content,
    .card-blur-overlay {
        transition: none;
        animation: none;
    }
}