/**
 * Processes Suggestions Styles
 *
 * Styles for the suggestion review modal and dashboard card.
 */

/* ==================== DASHBOARD CARD ==================== */

.suggestions-prompt-card {
    background: linear-gradient(135deg, #f0e6ff 0%, #e6f0ff 100%);
    border: 1px solid #d9c6ff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestions-prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.2);
}

.suggestions-prompt-card .card-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.suggestions-prompt-card .card-content {
    flex: 1;
}

.suggestions-prompt-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.suggestions-prompt-card .card-subtitle {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
}

.suggestions-prompt-card .card-count {
    background: var(--primary-purple, #8B7EC8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.suggestions-prompt-card .btn-review {
    background: var(--primary-purple, #8B7EC8);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.suggestions-prompt-card .btn-review:hover {
    background: #7a6db7;
}

/* ==================== REVIEW MODAL ==================== */

.suggestions-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.suggestions-modal {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.suggestions-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
}

.suggestions-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suggestions-modal-header .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.suggestions-modal-header .close-btn:hover {
    color: #333;
}

.suggestions-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.suggestions-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==================== SUGGESTION CARDS ==================== */

.suggestion-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.suggestion-card:hover {
    border-color: #b0b0b0;
}

.suggestion-card.processing {
    opacity: 0.6;
    pointer-events: none;
}

.suggestion-source {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #ddd;
}

.suggestion-source .source-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}

.suggestion-source p {
    margin: 0;
    font-size: 0.875rem;
    color: #555;
    font-style: italic;
    line-height: 1.5;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-target {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.suggestion-target .section {
    background: #e0e7ff;
    color: #4338ca;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.suggestion-target .field {
    background: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.suggestion-value {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.suggestion-value p {
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.5;
}

.suggestion-value .confidence {
    font-size: 0.75rem;
    color: #888;
}

.suggestion-value .confidence.confidence-high {
    color: #166534;
}

.suggestion-value .confidence.confidence-medium {
    color: #ca8a04;
}

.suggestion-value .confidence.confidence-low {
    color: #dc2626;
}

.suggestion-reasoning {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 12px;
    padding: 8px;
    background: #fff7e6;
    border-radius: 6px;
}

.suggestion-reasoning::before {
    content: 'AI Reasoning: ';
    font-weight: 600;
}

.suggestion-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.suggestion-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-approve {
    background: #22c55e;
    color: white;
    border: none;
}

.btn-approve:hover {
    background: #16a34a;
}

.btn-reject {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-reject:hover {
    background: #e2e8f0;
    color: #475569;
}

.btn-merge {
    background: var(--primary-purple, #8B7EC8);
    color: white;
    border: none;
}

.btn-merge:hover {
    background: #7a6db7;
}

/* ==================== EMPTY STATE ==================== */

.suggestions-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.suggestions-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.suggestions-empty h3 {
    margin: 0 0 8px 0;
    color: #333;
}

.suggestions-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* ==================== STATS ==================== */

.suggestions-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.suggestion-stat {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.suggestion-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-purple, #8B7EC8);
}

.suggestion-stat .stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== ANIMATIONS ==================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.suggestion-card.success {
    animation: success-pulse 0.3s ease;
    border-color: #22c55e;
    background: #f0fdf4;
}

/* ==================== LOADING ==================== */

.suggestions-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.suggestions-loading::before {
    content: '';
    width: 24px;
    height: 24px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--primary-purple, #8B7EC8);
    border-radius: 50%;
    margin-right: 12px;
    animation: spin 1s linear infinite;
}

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

/* ==================== BULK ACTIONS ==================== */

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(139, 126, 200, 0.1), rgba(127, 176, 105, 0.1));
    border-radius: 8px;
    border: 1px solid rgba(139, 126, 200, 0.2);
}

.btn-bulk-accept {
    background: linear-gradient(135deg, var(--primary-purple, #8B7EC8), var(--primary-green, #7FB069));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-bulk-accept:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 126, 200, 0.3);
}

.btn-bulk-accept:disabled,
.btn-bulk-accept.processing {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.bulk-hint {
    font-size: 0.75rem;
    color: #666;
}

/* ==================== EDIT MODE ==================== */

.suggestion-card.editing {
    border-color: var(--primary-purple, #8B7EC8);
    box-shadow: 0 0 0 3px rgba(139, 126, 200, 0.15);
}

.suggestion-edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 8px;
    color: #333;
}

.suggestion-edit-textarea:focus {
    outline: none;
    border-color: var(--primary-purple, #8B7EC8);
    box-shadow: 0 0 0 3px rgba(139, 126, 200, 0.15);
}

.edit-hint {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
}

.btn-edit {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-edit:hover {
    background: #f1f5f9;
    color: #334155;
}

.btn-cancel {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-cancel:hover {
    background: #e2e8f0;
    color: #475569;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .suggestions-modal {
        max-height: 95vh;
        margin: 10px;
    }

    .suggestions-prompt-card {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .suggestion-actions {
        flex-direction: column;
    }

    .suggestion-actions button {
        width: 100%;
    }

    .suggestions-stats {
        flex-direction: column;
        gap: 8px;
    }
}
