/**
 * Progress Indicator Styles for Daleel Application
 * These styles provide visual feedback for uploads, downloads, and page transitions
 */

/* Global Overlay - for page transitions */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.page-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Spinner - used for general loading */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(26, 35, 126, 0.1);
    border-radius: 50%;
    border-top-color: #1a237e;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Top Progress Bar - for page transitions */
.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(to right, #1a237e, #2196f3);
    z-index: 10000;
    transition: width 0.4s ease;
}

.top-progress-bar.complete {
    width: 100%;
}

/* Progress Bar Container - for file uploads and downloads */
.progress-container {
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 10px 0;
    overflow: hidden;
    height: 20px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #1a237e, #2196f3);
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    color: white;
    font-size: 12px;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

/* Submit Button States */
.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading:after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: calc(50% - 8px);
    left: calc(50% - 8px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

/* Skeleton Loading Screens */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
    height: 20px;
    margin-bottom: 10px;
}

.skeleton-loader.title {
    height: 32px;
    width: 70%;
}

.skeleton-loader.text {
    height: 16px;
}

.skeleton-loader.image {
    height: 200px;
}

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

/* File Upload Progress */
.file-upload-progress {
    display: none;
    margin-top: 15px;
}

.file-upload-progress.active {
    display: block;
}

.upload-details {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Contextual Progress Colors */
.progress-bar.bg-success {
    background: linear-gradient(45deg, #2e7d32, #4caf50);
}

.progress-bar.bg-warning {
    background: linear-gradient(45deg, #ef6c00, #ff9800);
}

.progress-bar.bg-danger {
    background: linear-gradient(45deg, #c62828, #f44336);
}

/* Fade Animations for Content */
.content-fadein {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* RTL Support */
[dir="rtl"] .top-progress-bar {
    right: 0;
    left: auto;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .upload-details {
        flex-direction: column;
    }
} 