/* CSS for the accessible modal dialogs created by localUtils.js */

/* backdrop / focus trap container */
.focus-trap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.focus-trap.hidden {
  display: none;
}

/* inner dialog box */
.focus-trap .modal {
  background: var(--color-background);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-base);
  max-width: 90%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Preserve newlines in string messages (many call sites use "\n\n") */
#issue-modal #modal-desc {
  white-space: pre-wrap;
}

/* button container: center buttons horizontally (uses id in markup) */
#issue-modal #modal-buttons {
  margin-top: var(--spacing-md);
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
}

/* buttons themselves use the shared btn-primary rules */
#issue-modal .modal button {
  min-height: var(--min-touch-target);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--animation-duration) ease;
}

#issue-modal .modal button.btn-primary {
  background: var(--color-primary);
  color: var(--color-background);
}

#issue-modal .modal button.btn-primary:hover {
  background: color-mix(in srgb, var(--color-primary) 90%, black);
  box-shadow: 0 2px 4px rgba(124, 77, 255, 0.2);
}

#issue-modal .modal button.btn-primary:active {
  box-shadow: 0 1px 2px rgba(124, 77, 255, 0.2);
}

#issue-modal .modal button:disabled {
  opacity: var(--opacity-disabled, 0.6);
  cursor: not-allowed;
  transform: none;
}
