.flag-modal {
  /* reuse global modal-overlay behavior but with higher stacking order when needed */
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none; /* shown by scripts via inline style or .show/.active */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 11000;
}
.flag-modal.show,
.flag-modal.active {
  display: flex;
}
.flag-modal .flag-dialog {
  /* inner dialog should inherit .modal styles; keep only dialog-specific overrides here */
  padding: 1.25rem;
  border-radius: 12px;
  width: 100%;
  max-width: 540px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  background: var(--white);
}

.flag-modal .form-wrapper {
  width: 100%;
}

.flag-modal .form-group {
  margin-bottom: 1rem;
}

.flag-modal .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--gray-700);
}

.flag-modal .form-input,
.flag-modal .form-textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  box-sizing: border-box;
}

.flag-modal .form-textarea {
  min-height: 90px;
  resize: vertical;
}

.flag-modal .text-muted.small {
  color: var(--gray-500);
  margin-top: 0.5rem;
}

.flag-modal .modal-footer {
  padding: 1.25rem;
}

.flag-modal .modal-actions-right {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  align-items: center;
}
.flag-modal .close-btn,
.flag-modal .modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}
/* Toast styles removed */

.flag-btn {
  background: none;
  border: none;
  color: var(--danger, #dc3545);
  cursor: pointer;
  font-size: 0.875rem;
}
.flag-btn i { pointer-events: none; }

.chat-btn {
  background: none;
  border: none;
  color: var(--primary, #E05E1A);
  cursor: pointer;
  font-size: 0.875rem;
  margin-left: 0.5rem;
  position: relative;
}
.chat-btn i { pointer-events: none; }

.chat-unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #EF4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* Ensure inline checkboxes align with label text inside the flag modal */
.flag-modal .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.flag-modal .checkbox-inline input[type="checkbox"] {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
}
