/* TetHub unified dialogs — theme-aware (follows html[data-theme]) */
.th-dialog.swal2-popup,
.swal2-popup.th-dialog,
.swal2-popup.swal-tethub-popup {
  background: var(--bg-primary, #fff) !important;
  color: var(--text-primary, #111) !important;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  border-radius: 16px !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18) !important;
  padding: 1.35rem 1.25rem 1.15rem !important;
  max-width: 26rem;
}

.th-dialog__title,
.swal2-title.th-dialog__title {
  color: var(--text-primary, #111) !important;
  font-size: 1.15rem !important;
  font-weight: 750 !important;
  line-height: 1.3 !important;
  padding: 0 !important;
  margin: 0 0 0.55rem !important;
}

.th-dialog__body,
.swal2-html-container.th-dialog__body {
  color: var(--text-secondary, #64748b) !important;
  font-size: 0.9rem !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  text-align: left !important;
}

.th-dialog__actions,
.swal2-actions.th-dialog__actions {
  margin: 1.1rem 0 0 !important;
  gap: 0.5rem !important;
  width: 100%;
}

.th-dialog__btn.swal2-styled,
.swal2-styled.th-dialog__btn {
  border-radius: 10px !important;
  font-weight: 650 !important;
  font-size: 0.875rem !important;
  padding: 0.55rem 1rem !important;
  box-shadow: none !important;
  margin: 0 !important;
}

.th-dialog__btn--primary {
  background: var(--primary, #046fad) !important;
  color: #fff !important;
}

.th-dialog__btn--danger {
  background: var(--danger, #dc2626) !important;
  color: #fff !important;
}

.th-dialog__btn--ghost {
  background: var(--bg-secondary, #f1f5f9) !important;
  color: var(--text-primary, #111) !important;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08)) !important;
}

.th-dialog--danger .th-dialog__icon,
.th-dialog--danger .swal2-icon.swal2-warning {
  border-color: color-mix(in srgb, var(--danger, #dc2626) 45%, transparent) !important;
  color: var(--danger, #dc2626) !important;
}

.th-dialog .swal2-icon {
  margin: 0.15rem auto 0.75rem !important;
  transform: scale(0.88);
}

.th-dialog .swal2-input,
.th-dialog .swal2-textarea,
.th-dialog .swal2-select {
  background: var(--bg-secondary, #f8fafc) !important;
  color: var(--text-primary, #111) !important;
  border: 1px solid var(--border-color, #e2e8f0) !important;
  border-radius: 10px !important;
  font-size: 0.9rem !important;
}

.th-dialog .swal2-select {
  width: 100% !important;
  padding: 0.65rem 0.85rem !important;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2394a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
}

.th-dialog .swal2-select option {
  background: var(--bg-primary, #fff);
  color: var(--text-primary, #111);
}

.th-dialog .swal2-validation-message {
  background: color-mix(in srgb, var(--danger, #dc2626) 10%, transparent) !important;
  color: var(--danger, #dc2626) !important;
}

.th-dialog .swal-link,
.swal-tethub-popup .swal-link {
  color: var(--primary, #046fad);
  font-weight: 650;
}

[data-theme="dark"] .th-dialog.swal2-popup,
[data-theme="dark"] .swal2-popup.th-dialog,
[data-theme="dark"] .swal2-popup.swal-tethub-popup {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="dark"] .th-dialog .swal2-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23cbd5e1' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") !important;
}

/* Report-a-problem form inside TetHubUI */
.th-report {
  text-align: left;
  width: 100%;
}
.th-report__lead {
  margin: 0 0 0.85rem;
  color: var(--text-secondary, #64748b);
  font-size: 0.88rem;
  line-height: 1.5;
}
.th-report__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary, #64748b);
  margin: 0 0 0.45rem;
}
.th-report__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.95rem;
}
.th-report__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-secondary, #f1f5f9);
  color: var(--text-primary, #111);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.th-report__chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.th-report__chip:has(input:checked),
.th-report__chip.is-on {
  border-color: color-mix(in srgb, var(--primary, #046fad) 55%, transparent);
  background: color-mix(in srgb, var(--primary, #046fad) 14%, transparent);
  color: var(--primary, #046fad);
}
.th-report__msg {
  width: 100%;
  min-height: 7rem;
  resize: vertical;
  box-sizing: border-box;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #111);
  font-size: 0.9rem;
  line-height: 1.45;
  font-family: inherit;
}
.th-report__msg:focus {
  outline: none;
  border-color: var(--primary, #046fad);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #046fad) 18%, transparent);
}
.th-report__hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  color: var(--text-tertiary, #94a3b8);
}

/* Compact badge strip used in confirm bodies */
.th-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}
.th-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  background: color-mix(in srgb, var(--primary, #046fad) 12%, transparent);
  color: var(--primary, #046fad);
  border: 1px solid color-mix(in srgb, var(--primary, #046fad) 22%, transparent);
}
