/* ═══════════════════════════════════════════════════════════
   v4.0: Condition Styles
   ═══════════════════════════════════════════════════════════ */

/* Condition Badges */
.condition-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}

.condition-nm {
  background: #10b981;
  color: white;
}

.condition-lp {
  background: #3b82f6;
  color: white;
}

.condition-mp {
  background: #f59e0b;
  color: white;
}

.condition-hp {
  background: #ef4444;
  color: white;
}

.condition-dmg {
  background: #991b1b;
  color: white;
}

.condition-grd {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: white;
}

/* Grading info display */
.grading-cert {
  font-family: monospace;
  font-size: 10px;
  color: #6d28d9;
}

.grading-cert-inline {
  font-family: monospace;
  font-size: 10px;
  color: #6d28d9;
}

/* Grading fields row in modals */
.grading-fields {
  border-left: 3px solid #8b5cf6;
  padding-left: 12px;
  margin-left: 4px;
}

/* Grading fields in batch/edit card lists */
.batch-grading-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  grid-column: 1 / -1;
  border-left: 3px solid #8b5cf6;
  padding: 8px 0 8px 12px;
  margin-left: 4px;
}

/* Card Badges Container */

/* Condition Filter Styles */
.condition-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.condition-filter-btn {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.condition-filter-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.condition-filter-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.condition-filter-btn.exclude {
  background: #ef4444;
  color: white;
  border-color: #dc2626;
}

/* Dark mode support for conditions */
body.dark-mode .condition-filter-btn {
  background: var(--border-hi);
  border-color: var(--border-hi);
  color: #e5e7eb;
}

body.dark-mode .condition-filter-btn:hover {
  background: var(--border-hi);
}

/* ═══════════════════════════════════════════════════════════
   v4.0: Duplicate Badge Styles
   ═══════════════════════════════════════════════════════════ */

.duplicate-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #8b5cf6;
  color: white;
  margin-right: 6px;
  border: 1px solid #7c3aed;
  box-shadow: 0 1px 3px rgba(139, 92, 246, 0.3);
}

.duplicate-badge:hover {
  background: #7c3aed;
}

/* Duplicate instance list */
.instance-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.instance-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #f9fafb;
  position: relative;
}

.instance-item:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.instance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.instance-title {
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 8px;
}

.instance-actions {
  display: flex;
  gap: 6px;
}

.instance-details {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}

.instance-detail-row {
  display: flex;
  gap: 4px;
}

.instance-detail-label {
  font-weight: 500;
  color: #4b5563;
}

/* Dark mode support */
body.dark-mode .instance-item {
  background: var(--surface2);
  border-color: var(--border-hi);
}

body.dark-mode .instance-item:hover {
  background: var(--bg);
  border-color: var(--border-hi);
}

body.dark-mode .instance-title {
  color: #e5e7eb;
}

body.dark-mode .instance-details {
  color: #9ca3af;
}

body.dark-mode .instance-detail-label {
  color: #d1d5db;
}

/* Dark mode for owned copies section */
body.dark-mode .owned-copies-section {
  background: var(--surface2);
  border-color: var(--border-hi);
}

body.dark-mode .owned-copies-header h3 {
  color: #e5e7eb;
}

body.dark-mode .owned-form-section {
  background: var(--surface2);
  border-color: var(--border-hi);
}

body.dark-mode .edit-mode-banner {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2) 0%, rgba(245, 158, 11, 0.2) 100%);
  border-bottom-color: rgba(245, 158, 11, 0.4);
}

body.dark-mode .edit-mode-content {
  color: #fbbf24;
}

body.dark-mode .edit-mode-copy-number {
  color: #f59e0b;
}

body.dark-mode .btn-ghost {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

body.dark-mode .btn-ghost:hover {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.6);
}

body.dark-mode .owned-modal-footer {
  background: var(--bg);
  border-top-color: var(--border-hi);
}
