/* Tailwind is loaded via CDN — this file only adds custom classes */

/* Active tab underline */
.tab-btn.active {
  border-bottom: 2px solid #2563eb;
  color: #2563eb;
  font-weight: 600;
}

/* Verdict badge colors */
.verdict-justified { background: #dcfce7; border: 1px solid #4ade80; color: #15803d; }
.verdict-suspicious { background: #fee2e2; border: 1px solid #f87171; color: #b91c1c; }
.verdict-unclear { background: #fef9c3; border: 1px solid #facc15; color: #92400e; }
.verdict-error { background: #f3f4f6; border: 1px solid #9ca3af; color: #374151; }

/* ─── Modal overlay ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: #fff;
  border-radius: 0.75rem;
  max-width: 42rem;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  cursor: pointer;
  color: #9ca3af;
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.15s;
}

.modal-close:hover {
  color: #374151;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-right: 2rem;
}

.modal-section {
  margin-bottom: 1rem;
}

.modal-section-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

.modal-section-text {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

/* ─── Info button ────────────────────────────────────────────────────────── */
.info-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 1rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}

.info-btn:hover {
  color: #2563eb;
  background: #eff6ff;
}

/* ─── Policy Editor ──────────────────────────────────────────────────────── */
.pe-tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  min-height: 2rem;
}

.pe-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #f3f4f6;
  color: #374151;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  line-height: 1.4;
}

.pe-tag-remove {
  color: #9ca3af;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 1rem;
}

.pe-tag-remove:hover { color: #ef4444; }

.pe-tag-input {
  flex: 1;
  min-width: 80px;
  border: 0;
  outline: none;
  font-size: 0.75rem;
  background: transparent;
}

/* ─── Receipt bar ─────────────────────────────────────────────────────────── */
#receipt-bar {
  background: #f0fdf4;
  border-color: #86efac;
}

/* ─── Scientific polish ───────────────────────────────────────────────────── */
.meta-row {
  font-feature-settings: "tnum" 1;
}

/* ─── Export buttons ──────────────────────────────────────────────────────── */
.export-btn-area {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.export-btn {
  font-size: 0.75rem;
  color: #9ca3af;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  transition: color 0.15s;
}
.export-btn:hover {
  color: #2563eb;
}

/* ─── Tab navigation (compact for 9+ tabs) ───────────────────────────────── */
.tab-btn {
  padding: 0.75rem 0.5rem;
  font-size: 0.75rem;
  white-space: nowrap;
}
@media (min-width: 768px) {
  .tab-btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* ─── Config drift badge ─────────────────────────────────────────────────── */
.config-drift-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  padding: 0.125rem 0.4rem;
  border-radius: 9999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 500;
}
.config-drift-badge.ok {
  background: #dcfce7;
  color: #15803d;
}

/* ─── Cache badge ─────────────────────────────────────────────────────────── */
.cache-badge {
  display: inline-block;
  font-size: 0.65rem;
  padding: 0.0625rem 0.35rem;
  border-radius: 9999px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 500;
}
.cache-badge.miss {
  background: #f3f4f6;
  color: #6b7280;
}

/* ─── Meta text ───────────────────────────────────────────────────────────── */
.meta-text {
  font-size: 0.7rem;
  color: #9ca3af;
  line-height: 1.3;
}
.meta-text strong {
  color: #6b7280;
}

/* ─── Shared receipt indicator ────────────────────────────────────────────── */
.shared-receipt-indicator {
  margin-top: 0.5rem;
}
.shared-receipt-thumb {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid #bfdbfe;
  transition: border-color 0.15s, transform 0.15s;
}
.shared-receipt-thumb:hover {
  border-color: #2563eb;
  transform: scale(1.08);
}
