/* Document Viewer Styles */

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-50px);
    transition: transform 0.3s ease;
}

.modal.active .modal-dialog {
    transform: translateY(0);
}

.modal-dialog.modal-lg {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #0F3057;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e5e5e5;
    color: #333;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
}

/* Preview Container */
.preview-container {
    position: relative;
}

.watermark-notice {
    background: linear-gradient(135deg, #E74C3C, #C0392B);
    color: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.watermark-notice i {
    margin-right: 8px;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0F3057;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Document Card Styles */
.document-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.document-card:hover {
    transform: translateY(-2px);
}

.document-card .card {
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.document-card .card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.document-card .card-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #0F3057, #1a4b7a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.document-icon-overlay {
    opacity: 0.7;
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.document-card:hover .preview-overlay {
    opacity: 1;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0F3057;
    line-height: 1.3;
}

.card-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #E74C3C;
}

.card-category {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-actions .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 10px 16px;
}

/* Category Filter Buttons */
.category-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-filter {
    padding: 12px 24px;
    border: 2px solid #0F3057;
    background: white;
    color: #0F3057;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-filter:hover,
.category-filter.active {
    background: #0F3057;
    color: white;
    text-decoration: none;
}

/* Success Notification */
.success-notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Document Info Styles */
.document-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
}

.document-info h4 {
    color: #0F3057;
    margin-bottom: 10px;
}

.document-info .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #E74C3C;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        margin: 20px;
    }
    
    .modal-dialog.modal-lg {
        max-width: 95%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .category-filters {
        justify-content: center;
    }
    
    .category-filter {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .card-actions {
        flex-direction: column;
    }
    
    .card-actions .btn {
        width: 100%;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .modal-dialog {
        background: #2c2c2c;
        color: white;
    }
    
    .modal-header,
    .modal-footer {
        background: #333;
        border-color: #555;
    }
    
    .modal-close {
        color: #ccc;
    }
    
    .modal-close:hover {
        background: #555;
        color: white;
    }
    
    .document-info {
        background: #333;
    }
} 