/* Badge Component Styles */

/* Base badge styles */
.badge,
.document-type-badge,
.processing-stage-badge,
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    text-transform: capitalize;
}

/* Document Type Badge */
.document-type-badge {
    background: #e0e0e0;
    color: #333;
}

/* Processing Stage Badges */
.processing-stage-badge {
    background: #2196f3;
    color: white;
}

.processing-stage-badge.stage-pending {
    background: #ffa100;
}

.processing-stage-badge.stage-processing-extracting-text {
    background: #2196f3;
}

.processing-stage-badge.stage-processing-classifying {
    background: #1976d2;
}

.processing-stage-badge.stage-processing-extracting-fields {
    background: #1565c0;
}

.processing-stage-badge.stage-processing-standardizing {
    background: #0d47a1;
}

.processing-stage-badge.stage-processing-linking-entities {
    background: #01579b;
}

.processing-stage-badge.stage-processing-saving-to-drive {
    background: #006064;
}

.processing-stage-badge.stage-completed {
    background: #11b76b;
}

/* Status Badges */
.status-badge {
    background: #666;
    color: white;
}

.status-badge.status-pending {
    background: #ffa100;
}

.status-badge.status-completed {
    background: #11b76b;
}

.status-badge.status-failed {
    background: #fa4362;
}

/* Special badges */
.password-protected {
    background: #ff9800;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.unlocked-status {
    background: #4CAF50;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* PDF Modified Warning Badge */
.pdf-modified-badge {
    background: #ff6b35;  /* Orange-red for warning */
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    cursor: help;
}

/* ========================================
   FRAUD FLAG BADGES (Task 153)
   ======================================== */

/* Base fraud flag badge styling - all orange */
.fraud-flag-badge,
.fraud-flag-badge-inline {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    background: #ff9800;  /* Orange - all fraud flags */
    color: white;
    cursor: help;
}

/* Inline badge (job list) - compact version */
.fraud-flag-badge-inline {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

/* Fraud section styling */
.fraud-indicators-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 8px;
}

.fraud-section-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #e65100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fraud-icon {
    font-size: 1.2rem;
}

.fraud-flags-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fraud-flag-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.fraud-flag-description {
    color: #666;
    font-size: 0.875rem;
    line-height: 1.4;
    flex: 1;
}

/* ========================================
   DEAL STAGE BADGES -- AUTOCOMPLETE VARIANT
   ======================================== */

/* Compact pill shown after the deal name in autocomplete suggestions */
.stage-badge--autocomplete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-left: 8px;
    vertical-align: middle;
}

.stage-badge--autocomplete::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

/* Per-stage colours — progress from grey (Lead) through blue/purple
   (qualification) to green (active/paid out), red for terminal/dormant. */
.stage-badge--lead {
    background: rgba(156, 163, 175, 0.15);
    color: #6b7280;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.stage-badge--qualified-lead {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.stage-badge--submitted-to-credit {
    background: rgba(139, 92, 246, 0.12);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.stage-badge--approved-by-credit {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.stage-badge--term-sheet-signed {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.stage-badge--paid-out {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.stage-badge--completed {
    background: rgba(107, 114, 128, 0.12);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.25);
}

.stage-badge--dormant {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.stage-badge--dormant-dnq {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Responsive */
@media (max-width: 768px) {
    .fraud-indicators-section {
        padding: 1rem;
        margin-top: 1rem;
    }

    .fraud-flag-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }

    .fraud-flag-badge-inline {
        font-size: 0.65rem;
        padding: 0.1rem 0.3rem;
    }

    .fraud-section-title {
        font-size: 0.9rem;
    }

    .fraud-flag-description {
        font-size: 0.8rem;
    }
}
