/**
 * Upload Progress Bar Styles
 * Styling for Dropzone upload progress indicators
 */

/* Progress Bar Container */
.upload-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Progress Bar Inner Container */
.progress-bar-container {
    position: relative;
    width: 100%;
    height: 24px;
    background: var(--color-surface-subtle);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Progress Bar Fill */
.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
    border-radius: 12px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* Progress Bar Text */
.progress-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-primary);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    z-index: 10;
    pointer-events: none;
}

/* Progress Bar Animation */
@keyframes progress-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.progress-bar-fill {
    animation: progress-pulse 2s ease-in-out infinite;
}

/* Avatar Container Progress Bar Override */
.profile-avatar-container .upload-progress-bar {
    border-radius: 0 0 50% 50%;
}

/* Cover Container Progress Bar */
.org-cover-image .upload-progress-bar {
    border-radius: 0;
}

/* ========================================
   CLICKABLE DROPZONE CONTAINERS
   Make containers visually indicate they're clickable
   ======================================== */

.profile-avatar-container,
.org-cover-image,
.logo-image-wrapper {
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.profile-avatar-container:hover,
.org-cover-image:hover,
.logo-image-wrapper:hover {
    opacity: 0.9;
}

/* Drag-over visual feedback */
.profile-avatar-container.dropzone-drag-over,
.org-cover-image.dropzone-drag-over,
.logo-image-wrapper.dropzone-drag-over {
    outline: 3px dashed #0969da;
    outline-offset: -3px;
    opacity: 0.8;
}

/* Uploading state */
.profile-avatar-container.uploading,
.org-cover-image.uploading,
.logo-image-wrapper.uploading {
    pointer-events: none;
    opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .upload-progress-bar {
        padding: 8px;
    }
    
    .progress-bar-container {
        height: 20px;
    }
    
    .progress-bar-text {
        font-size: 11px;
    }
}

/* Dark Mode Support (if applicable) */
@media (prefers-color-scheme: dark) {
    .upload-progress-bar {
        background: rgba(30, 30, 30, 0.95);
    }
    
    .progress-bar-container {
        background: #2a2a2a;
    }
    
    .progress-bar-text {
        color: #fff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }
}

/* Smooth Entry Animation */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.upload-progress-bar {
    animation: slideInUp 0.3s ease-out;
}

/* Completion Animation */
.progress-bar-fill[style*="100%"] {
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
    animation: none;
}

/* ========================================
   DROPZONE MESSAGE POSITIONING
   Position messages to avoid overlapping avatar
   ======================================== */

/* Cover image dropzone message - position to the right to avoid avatar overlap */
.org-cover-image .dz-message {
    position: absolute !important;
    right: 20px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: auto !important;
    max-width: 180px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    color: #666;
    pointer-events: none;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: opacity 0.2s ease;
}

/* Hide message during upload */
.org-cover-image.uploading .dz-message {
    opacity: 0;
    pointer-events: none;
}

/* Hide default dropzone message icon if any */
.org-cover-image .dz-message .dz-button {
    display: none;
}

/* Style for the message text */
.org-cover-image .dz-default.dz-message {
    margin: 0;
}

/* Responsive: move message for smaller screens */
@media (max-width: 576px) {
    .org-cover-image .dz-message {
        right: 10px !important;
        max-width: 140px;
        padding: 8px 12px;
        font-size: 11px;
    }
}
