/**
 * JORO Data Integrity Guard - Badge Styles
 * Only visible to super users
 * @version 1.0.0
 */

/* Base badge styles */
.data-integrity-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.data-integrity-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Badge icon */
.data-integrity-badge .badge-icon {
  font-size: 12px;
  line-height: 1;
}

/* Badge text */
.data-integrity-badge .badge-text {
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Badge score */
.data-integrity-badge .badge-score {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

/* Verified (PASS) - Green */
.data-integrity-badge.data-integrity-verified {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border: 1px solid #10b981;
}

.data-integrity-badge.data-integrity-verified .badge-score {
  background: rgba(16, 185, 129, 0.2);
}

/* Unverified (WARN) - Orange */
.data-integrity-badge.data-integrity-unverified {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border: 1px solid #f59e0b;
}

.data-integrity-badge.data-integrity-unverified .badge-score {
  background: rgba(245, 158, 11, 0.2);
}

/* Review Needed (FAIL) - Red */
.data-integrity-badge.data-integrity-review {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  border: 1px solid #ef4444;
}

.data-integrity-badge.data-integrity-review .badge-score {
  background: rgba(239, 68, 68, 0.2);
}

/* Pending - Gray with pulse */
.data-integrity-badge.data-integrity-pending {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  color: #6b7280;
  border: 1px solid #d1d5db;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Unknown - Gray */
.data-integrity-badge.data-integrity-unknown {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  color: #6b7280;
  border: 1px solid #d1d5db;
}

/* Profile card header layout */
.business-profile-card .profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.business-profile-card .profile-card-title {
  margin: 0;
  flex-shrink: 0;
}

/* Tooltip for badge details */
.data-integrity-badge[title] {
  position: relative;
}

/* Data Integrity Modal (for showing details) */
.data-integrity-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.data-integrity-modal.active {
  display: flex;
}

.data-integrity-modal-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.data-integrity-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.data-integrity-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}

.data-integrity-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.data-integrity-modal-close:hover {
  color: #1e293b;
}

.data-integrity-issue {
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  border-left: 4px solid;
}

.data-integrity-issue.HIGH {
  background: #fef2f2;
  border-color: #ef4444;
}

.data-integrity-issue.MEDIUM {
  background: #fffbeb;
  border-color: #f59e0b;
}

.data-integrity-issue.LOW {
  background: #f0fdf4;
  border-color: #22c55e;
}

.data-integrity-issue-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  opacity: 0.8;
}

.data-integrity-issue-message {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

/* Score display in modal */
.data-integrity-score-display {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 16px;
}

.data-integrity-score-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.data-integrity-score-circle.pass {
  background: #ecfdf5;
  color: #065f46;
  border: 3px solid #10b981;
}

.data-integrity-score-circle.warn {
  background: #fffbeb;
  color: #92400e;
  border: 3px solid #f59e0b;
}

.data-integrity-score-circle.fail {
  background: #fef2f2;
  color: #991b1b;
  border: 3px solid #ef4444;
}

.data-integrity-score-info {
  flex: 1;
}

.data-integrity-score-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.data-integrity-score-status {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}
