/* src/public/css/batch-upload.css */

/* Batch Upload Section */
.batch-upload-section {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 0;
    margin-top: 1rem;
    overflow: hidden;
}

.upload-method-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.upload-tab {
    flex: 1;
    padding: 1rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    color: #6c757d;
}

    .upload-tab:hover {
        background: #e9ecef;
    }

    .upload-tab.active {
        background: white;
        border-bottom-color: #667eea;
        color: #667eea;
    }

.upload-method-content {
    padding: 1.5rem;
    display: none;
}

    .upload-method-content.active {
        display: block;
    }

/* File Upload */
.file-upload-area {
    margin: 1rem 0;
}

.file-drop-zone {
    border: 3px dashed #d0d7de;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

    .file-drop-zone:hover {
        border-color: #667eea;
        background: #f0f8ff;
    }

    .file-drop-zone.dragover {
        border-color: #667eea;
        background: #e6f3ff;
        transform: scale(1.02);
    }

.file-drop-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-drop-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.file-drop-hint {
    font-size: 0.9rem;
    color: #666;
}

/* File Preview */
.file-preview-container {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #28a745;
}

.file-info-text {
    flex: 1;
}

.file-info h4 {
    margin: 0 0 0.25rem 0;
    color: #333;
}

.file-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.preview-table {
    max-height: 300px;
    overflow: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
}

    .preview-table table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;
    }

    .preview-table th {
        background: #667eea;
        color: white;
        padding: 0.75rem;
        text-align: left;
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .preview-table td {
        padding: 0.75rem;
        border-bottom: 1px solid #e0e0e0;
    }

    .preview-table tr:hover {
        background: #f8f9fa;
    }

/* Column Mapping */
.column-mapping {
    margin: 1rem 0;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

    .column-mapping h5 {
        margin: 0 0 1rem 0;
        color: #856404;
    }

.mapping-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

    .mapping-row label {
        min-width: 100px;
        font-weight: 600;
    }

    .mapping-row select {
        flex: 1;
        padding: 0.5rem;
        border: 1px solid #ddd;
        border-radius: 4px;
    }

/* Batch Progress */
.batch-progress {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #17a2b8;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Batch Results */
.batch-results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.result-stat {
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
    color: white;
    font-weight: 600;
}

    .result-stat.success {
        background: #28a745;
    }

    .result-stat.warning {
        background: #ffc107;
        color: #333;
    }

    .result-stat.error {
        background: #dc3545;
    }

    .result-stat.info {
        background: #17a2b8;
    }

    .result-stat .number {
        font-size: 2rem;
        font-weight: 900;
        display: block;
    }

    .result-stat .label {
        font-size: 0.9rem;
        opacity: 0.9;
    }

.batch-details {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
}

.batch-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

    .batch-item:last-child {
        border-bottom: none;
    }

.batch-item-status {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
}

    .batch-item-status.success {
        background: #28a745;
    }

    .batch-item-status.error {
        background: #dc3545;
    }

    .batch-item-status.warning {
        background: #ffc107;
        color: #333;
    }

.batch-item-info {
    flex: 1;
}

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

.batch-item-details {
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    .upload-method-tabs {
        flex-direction: column;
    }

    .mapping-row {
        flex-direction: column;
        align-items: stretch;
    }

        .mapping-row label {
            min-width: unset;
        }

    .batch-results-summary {
        grid-template-columns: 1fr 1fr;
    }
}
