/* Shared semantic badge geometry. Header #450-81 is a frozen composition. */
:root {
    --badge-height: 24px;
    --badge-font-size: 12px;
    --badge-line-height: 18px;
    --badge-radius: 4px;
    --badge-gap: 6px;
}
html body :is(.consult-result-type, .date-agenda-label, .date-agenda-count, .cal-ev-type, .info-item-category, .news-dialog-category, .bid-type, .collab-pending-status, .collab-status, .collab-role-leader, .company-history-type, .related-company-status, .related-company-contact-status, .bidder-company-contact-status, .related-company-license, .related-company-detail-license, .bidder-company-bid-status, .bidder-company-license, .bidder-company-business-status, .institution-fiscal-type, .institution-fiscal-badge, .ui-flow-status, .pvtbid-pin-label, .news-comment-state, .license-code,
    span:not([class])[style*="font-size"][style*="padding"][style*="border-radius"]:not([style*="position:absolute"]):not([aria-hidden]),
    .co-me-tag, .fig-card-tag, .home-week-item-type, .license-category-tag, .bm-side-deadline, .bm-side-status-open, .work-log-date-tag, .work-log-time-tag, .work-log-verify-tag,
    .ui-badge,
    .badge,
    .acc-badge,
    .activity-action-badge,
    .activity-result-badge,
    .activity-stat-chip,
    .attachment-chip,
    .bid-stat-chip,
    .bidder-badge,
    .cached-badge,
    .checklist-id-badge,
    .co-member-badge,
    .collab-list-chip,
    .comment-count-badge,
    .consortium-badge,
    .contract-number-chip,
    .dash-event-type-badge,
    .data-source-badge,
    .elapsed-pill,
    .fig-badge,
    .fig-chip,
    .filter-badge,
    .filter-chip,
    .filter-current-badge,
    .fiscal-badge,
    .fiscal-badge-local,
    .fiscal-badge-private,
    .fiscal-field-chip,
    .history-badge,
    .identity-badge,
    .info-badge,
    .joint-supply-badge,
    .kakao-status-badge,
    .license-chip,
    .metric-pill,
    .msg-chat-voice-badge,
    .msg-room-pin-badge,
    .msg-room-voice-badge,
    .msg-search-chip,
    .notice-status-chip,
    .notif-cat-badge,
    .oh-badge,
    .oh-badge-cancelled,
    .oh-badge-revised,
    .oh-rank-badge,
    .partner-looking-badge,
    .price-badge,
    .private-bid-type-badge,
    .profile-condition-chip,
    .pvtbid-deadline-badge,
    .related-company-match-badge,
    .results-license-chip,
    .results-unsaved-filter-chip,
    .sf-modified-badge,
    .status-badge,
    .status-pill,
    .sub-badge,
    .summary-badge,
    .sw-option-badge,
    .time-pill,
    .type-badge,
    .vc-meeting-badge,
    .vc-rec-new-badge,
    .version-pill,
    .wiz-badge,
    .wiz-badge-ok,
    .wiz-badge-warn,
    .writing-doc-chip,
    .detail-tag,
    .area-tag,
    .filter-keyword-tag,
   
    .norm-indicator,
    .fiscal-indicator,
    .comment-indicator, span.status, span.deadline):not(#modalTypeLabel):not([hidden]):not(.hidden) {
    box-sizing: border-box !important;
    display: inline-flex;
    align-items: center !important;
    align-self: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: var(--badge-height) !important;
    height: auto !important;
    padding: 2px 6px !important;
    margin-block: 0 !important;
    border: 1px solid transparent !important;
    border-radius: var(--badge-radius) !important;
    font-size: var(--badge-font-size) !important;
    font-weight: 600 !important;
    line-height: var(--badge-line-height) !important;
    letter-spacing: 0 !important;
    max-width: 100%;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: break-word;
    box-shadow: none !important;
}
html body .result-card :is(.header-left, .header-right) {
    align-items: center;
    flex-wrap: wrap;
    gap: var(--badge-gap);
}
html body .result-card :is(.norm-indicator, .fiscal-indicator, .comment-indicator) {
    color: var(--color-text-secondary, #475569);
    background: var(--bg-secondary, #f1f5f9);
}

/* Geometry is shared; type and state keep semantic color alone. */
html body .result-card .type-badge.bid_purchase { background: #00695c !important; color: #fff !important; }
html body .result-card .type-badge.bid_service { background: #5e35b1 !important; color: #fff !important; }
html body .result-card .type-badge:is(.bid, .consortium) { background: #1565c0 !important; color: #fff !important; }
html body .result-card .type-badge:is(.success_bid, .success_bid_purchase, .success_bid_service) { background: #880e4f !important; color: #fff !important; }
html body .ui-badge {
    color: var(--color-text, #334155) !important;
    background: var(--bg-secondary, #f1f5f9) !important;
}

html body .ui-badge.ui-badge--success { color: #166534 !important; background: #dcfce7 !important; }
html body .ui-badge.ui-badge--warning { color: #92400e !important; background: #fef3c7 !important; }
html body .ui-badge.ui-badge--danger { color: #991b1b !important; background: #fee2e2 !important; }
html body .ui-badge.ui-badge--info { color: #1e40af !important; background: #dbeafe !important; }
html[data-theme="dark"] body .ui-badge.ui-badge--success { color: #bbf7d0 !important; background: #14532d !important; }
html[data-theme="dark"] body .ui-badge.ui-badge--warning { color: #fde68a !important; background: #78350f !important; }
html[data-theme="dark"] body .ui-badge.ui-badge--danger { color: #fecaca !important; background: #7f1d1d !important; }
html[data-theme="dark"] body .ui-badge.ui-badge--info { color: #bfdbfe !important; background: #1e3a8a !important; }

html body .result-card :is(.norm-indicator, .fiscal-indicator, .comment-indicator) {
    color: #334155; background: #e2e8f0;
}
html[data-theme="dark"] body .result-card :is(.norm-indicator, .fiscal-indicator, .comment-indicator) {
    color: #cbd5e1; background: #263449;
}
html body .ui-badge.ui-badge--neutral { color: #334155 !important; background: #e2e8f0 !important; }
html[data-theme="dark"] body .ui-badge.ui-badge--neutral { color: #cbd5e1 !important; background: #263449 !important; }

html body :is(.data-source-badge, .ui-badge):empty { display: none !important; }

/* Compatibility for cached renderers using the previous anonymous inline chips. */
html body span:not([class])[style*="font-size"][style*="padding"][style*="border-radius"]:not([style*="position:absolute"]):not([aria-hidden]) { color: #334155 !important; background: #e2e8f0 !important; }
html[data-theme="dark"] body span:not([class])[style*="font-size"][style*="padding"][style*="border-radius"]:not([style*="position:absolute"]):not([aria-hidden]) { color: #cbd5e1 !important; background: #263449 !important; }

/* Old icon margins must not add to the shared gap in a badge row. */
html body .result-card :is(.header-left, .header-right) > :is(.type-badge, .status, .deadline, .norm-indicator, .fiscal-indicator, .comment-indicator, .joint-supply-badge, .consortium-badge) {
    margin-inline: 0 !important;
}
