/* SPDX-License-Identifier: MIT */
/* Upload Interface Specific Styles - Extends Base */

/* Upload Header */
.upload-header {
    margin-bottom: var(--space-xl);
    text-align: center;
}

/* Back link uses base btn-light styles with minimal customization */
.back-link {
    margin-bottom: var(--space-lg);
    font-size: 0.9rem;
    padding: var(--space-sm) var(--space-md);
}

.back-icon {
    flex-shrink: 0;
}

/* Drop Zone */
.drop-zone {
    padding: 4rem 2rem;
    border: 2px dashed var(--border);
    border-radius: 20px;
    margin: var(--space-xl);
    text-align: center;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.drop-zone:hover::before,
.drop-zone.drag-over::before {
    opacity: 0.05;
}

.drop-zone.drag-over {
    border-color: var(--text-accent);
    background: var(--bg-glass);
    transform: scale(1.01);
    /* More subtle */
    box-shadow: 0 0 0 1px var(--text-accent), var(--shadow-minimal);
}

.drop-zone.touch-active {
    border-color: var(--text-accent);
    background: var(--bg-glass);
    transform: scale(0.99);
    /* More subtle */
    box-shadow: 0 0 0 1px var(--text-accent), var(--shadow-minimal);
}

.drop-zone.drag-over .upload-icon svg {
    transform: scale(1.1);
    stroke: var(--text-accent);
}

.drop-zone-content {
    pointer-events: none;
}

.upload-icon {
    margin-bottom: var(--space-lg);
}

.upload-icon svg {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.drop-zone-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.drop-zone-subtitle {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
}

.upload-info {
    margin-top: var(--space-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.upload-info p {
    margin: 0.25rem 0;
}

/* Upload Queue */
.upload-queue {
    margin: 0 var(--space-xl) var(--space-xl);
    border-top: 1px solid var(--border);
    padding-top: var(--space-xl);
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.queue-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.queue-actions {
    display: flex;
    gap: 0.75rem;
}

/* Danger modifier for light buttons - extends base btn-light */
.btn-light.danger {
    color: #ff8a8a;
    border-color: rgba(255, 138, 138, 0.4);
    background: rgba(255, 107, 107, 0.08);
    box-shadow: var(--shadow-button);
}

.btn-light.danger:hover {
    background: rgba(255, 107, 107, 0.15);
    border-color: rgba(255, 138, 138, 0.6);
    color: #ff6b6b;
    box-shadow: var(--shadow-hover);
}

/* Queue Items */
.queue-item {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    transition: var(--transition-fast);
}

.queue-item:hover {
    background: var(--hover-bg);
}

.queue-item.uploading {
    border-color: rgba(255, 255, 255, 0.3);
}

.queue-item.completed {
    border-color: rgba(34, 197, 94, 0.5);
}

.queue-item.error {
    border-color: rgba(239, 68, 68, 0.5);
}

.file-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--space-md);
    flex-shrink: 0;
}

.file-icon svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.file-size {
    font-family: var(--font-family);
}

.file-progress {
    flex-shrink: 0;
    margin-left: var(--space-md);
    min-width: 100px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-accent);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
    display: block;
}

.file-actions {
    display: flex;
    gap: var(--space-sm);
    margin-left: var(--space-md);
}

.file-action {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.file-action:hover {
    background: var(--hover-bg);
}

.file-action.remove {
    color: #ff6b6b;
    border-color: rgba(255, 107, 107, 0.3);
}

.file-action.remove:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
}

.file-action svg {
    width: 14px;
    height: 14px;
}

/* Upload Summary */
.upload-summary {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-lg) var(--space-xl);
}

.summary-content {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.summary-stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-accent);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.summary-progress {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.summary-progress .progress-bar {
    flex: 1;
    height: 8px;
    margin-bottom: 0;
}

.progress-text {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.875rem;
    min-width: 80px;
    text-align: right;
}

/* Upload Messages */
.upload-messages {
    margin-top: var(--space-lg);
}

.upload-message {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.upload-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.upload-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.upload-message.warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}

.message-icon {
    flex-shrink: 0;
}

.message-icon svg {
    width: 16px;
    height: 16px;
}

.message-content {
    flex: 1;
}

.message-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.message-text {
    opacity: 0.9;
    font-size: 0.875rem;
}

/* Status Indicators */
.status-uploading::after {
    content: '';
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    margin-left: var(--space-sm);
    display: inline-block;
    animation: pulse 1.5s infinite;
}

.status-completed::after {
    content: '✓';
    color: #22c55e;
    font-weight: bold;
    margin-left: var(--space-sm);
}

.status-error::after {
    content: '✕';
    color: #ef4444;
    font-weight: bold;
    margin-left: var(--space-sm);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .drop-zone {
        padding: 2.5rem var(--space-md);
        margin: var(--space-md);
    }

    .upload-queue {
        margin: 0 var(--space-md) var(--space-md);
    }

    .summary-content {
        gap: var(--space-lg);
    }

    .queue-item {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .file-progress {
        margin-left: 0;
        order: 3;
        flex-basis: 100%;
    }

    .file-actions {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .summary-content {
        flex-direction: column;
        gap: var(--space-md);
    }

    .summary-progress {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .progress-text {
        text-align: center;
    }
}