/* ========================================
   Unified Upload Components
   - Drop zones
   - Upload queue (floating panel)
   ======================================== */

/* ========================================
   Upload Queue (Floating Panel)
   ======================================== */

.upload-queue-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 400px;
    max-height: 60vh;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-divider);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transform: translateY(calc(100% + var(--space-lg)));
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.upload-queue-container.active {
    transform: translateY(0);
    opacity: 1;
}

.upload-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-divider);
}

.upload-queue-title {
    font-weight: var(--font-weight-semibold);
    color: var(--text-high);
}

.upload-queue-cancel {
    background: none;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    font-size: var(--font-size-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.upload-queue-cancel:hover {
    background: var(--bg-hover);
    color: var(--error);
}

.upload-queue-progress {
    height: 4px;
    background: var(--bg-hover);
    overflow: hidden;
}

.upload-queue-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.2s ease;
}

.upload-queue-stats {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-sm);
    color: var(--text-medium);
    border-bottom: 1px solid var(--border-divider);
}

.upload-queue-stats .stat-uploaded {
    color: var(--success);
}

.upload-queue-stats .stat-skipped {
    color: var(--warning);
}

.upload-queue-stats .stat-failed {
    color: var(--text-medium);
}

.upload-queue-stats .stat-failed.has-errors {
    color: var(--error);
}

.upload-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: var(--space-xs);
    padding: var(--space-md);
    overflow-y: auto;
    max-height: calc(60vh - 120px);
}

.upload-queue-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card);
}

.upload-queue-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-queue-item-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    transition: background 0.2s ease;
}

.upload-queue-item.status-pending .upload-queue-item-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.upload-queue-item.status-uploading .upload-queue-item-overlay {
    background: rgba(57, 151, 151, 0.4);
}

.upload-queue-item.status-done .upload-queue-item-overlay {
    background: rgba(34, 197, 94, 0.3);
}

.upload-queue-item.status-skipped .upload-queue-item-overlay {
    background: rgba(245, 158, 11, 0.3);
}

.upload-queue-item.status-failed .upload-queue-item-overlay {
    background: rgba(239, 68, 68, 0.4);
}

@media (max-width: 768px) {
    .upload-queue-container {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 50vh;
    }

    .upload-queue-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
}

/* ========================================
   Drop Zone (Batch)
   ======================================== */
.batch-drop-zone {
    border: 2px dashed var(--border-divider);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
}

.batch-drop-zone:hover,
.batch-drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.batch-drop-zone .drop-icon {
    width: 48px;
    height: 48px;
    color: var(--text-subtle);
    margin-bottom: var(--space-sm);
}

.batch-drop-zone .drop-text {
    color: var(--text-medium);
    margin: 0;
}

.batch-drop-zone .drop-subtext {
    font-size: var(--font-size-sm);
    color: var(--text-subtle);
    margin: var(--space-xs) 0 0;
}
