/* css/components/dialog.css
 * Generic modal-dialog component (backdrop + panel + actions).
 * Currently used by the Report dialog (#report-modal / #report-dialog in
 * includes/footer.php, controller in js/app.js), but the .g-dialog* classes
 * are intentionally generic so any future real dialog can reuse them.
 *
 * Ownership: this file owns dialog/backdrop styling exclusively. Do not
 * duplicate these rules in css/theme-v3.css or css/gobstagram.css.
 */

.g-dialog-backdrop[hidden] { display: none; }

.g-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .6);
  box-sizing: border-box;
}

.g-dialog {
  width: min(340px, 100%);
  max-height: 100%;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
  background: var(--g-surface-panel, #fff);
  border: 2px solid var(--g-border-strong, #8f4a39);
  color: var(--g-text-primary, #101114);
  font-family: Tahoma, Arial, sans-serif;
  font-size: 12px;
}

.g-dialog h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.g-dialog p {
  margin: 0 0 12px;
}

.g-dialog label {
  display: block;
  margin-bottom: 4px;
  color: var(--g-text-secondary, #555);
}

.g-dialog select,
.g-dialog textarea,
.g-dialog input[type="text"] {
  width: 100%;
  padding: 5px;
  margin-bottom: 10px;
  box-sizing: border-box;
  border: 1px solid var(--g-border-default, #ccc);
  border-radius: 3px;
}

.g-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.g-dialog-actions button {
  padding: 5px 12px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

#report-cancel {
  background: #ccc;
}

.g-danger-action {
  background: var(--g-danger, #cc6600);
  color: #fff;
  font-weight: bold;
}

/* Prevent background scroll while a dialog is open. */
.has-dialog-open {
  overflow: hidden;
}
