/**
 * Uni-Planner - AI Module Recognition Styles
 * Styles für KI-gestützte Modulerkennung
 */

/* AI Upload Section */
.ai-upload-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

.ai-upload-container {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
}

/* File Upload Area */
.file-upload-area {
    position: relative;
    margin: 1rem 0;
    border: 2px dashed #cbd5e0;
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #4a90e2;
    background: #f0f4f8;
}

.file-upload-area.drag-over {
    border-color: #4a90e2;
    background: #e6f2ff;
    transform: scale(1.02);
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    padding: 3rem 2rem;
    text-align: center;
}

.upload-icon {
    color: #718096;
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: #718096;
}

/* File Preview */
.file-preview {
    position: relative;
    padding: 1rem;
}

.file-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-remove-file {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: rgba(220,38,38,0.9);
    transform: scale(1.1);
}

/* AI Analysis Status */
.ai-status {
    padding: 2rem;
    text-align: center;
    background: #f0f4f8;
    border-radius: 6px;
    margin-top: 1rem;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border: 4px solid #e2e8f0;
    border-top-color: #4a90e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-text {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
}

/* AI Analysis Result */
.ai-result {
    padding: 1.5rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 6px;
    margin-top: 1rem;
}

.result-header,
.error-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.result-icon.success {
    color: #22c55e;
}

.result-title,
.error-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.result-title {
    color: #16a34a;
}

.result-message,
.error-message {
    color: #4a5568;
    margin-bottom: 1rem;
}

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

/* AI Analysis Error */
.ai-error {
    padding: 1.5rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    margin-top: 1rem;
}

.error-icon {
    color: #ef4444;
}

.error-title {
    color: #dc2626;
}

/* Module Review Modal */
.modal.large .modal-content {
    max-width: 900px;
}

.module-review-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem;
}

.module-review-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
}

.module-review-fields {
    display: grid;
    grid-template-columns: 80px 1fr 80px auto auto;
    gap: 0.75rem;
    align-items: center;
}

.form-input.small {
    width: 100%;
}

.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon.btn-delete {
    background: #fee;
    color: #dc2626;
}

.btn-icon.btn-delete:hover {
    background: #dc2626;
    color: white;
}

/* Checkbox Styles */
.form-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #718096;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-upload-section {
        padding: 1rem;
    }
    
    .file-upload-content {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        width: 36px;
        height: 36px;
    }
    
    .upload-text {
        font-size: 1rem;
    }
    
    .module-review-fields {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .module-review-fields input,
    .module-review-fields label {
        width: 100%;
    }
    
    .btn-icon.btn-delete {
        width: 100%;
        height: 40px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-result,
.ai-error {
    animation: fadeIn 0.3s ease;
}