/* === Modal backdrop === */
.help-id-modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.show {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background-color: #000;
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal-backdrop.show {
  opacity: 0.5;
}

/* === Dialog positioning & centering === */
.help-id-modal .modal-dialog {
  position: relative;
  pointer-events: none;
  margin: 1.75rem auto;
}

/* Vertical centering when using modal-dialog-centered */
.help-id-modal .modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - 1rem); /* accounts for top/bottom margin */
}

/* Your specific modal width */
@media (min-width: 576px) {
  #HelpId .modal-dialog {
    max-width: 480px; /* your preferred width */
  }
}

/* Mobile: almost full width, still centered */
@media (max-width: 575.98px) {
  #HelpId .modal-dialog {
    margin: 0.5rem auto;
    max-width: 90%; /* or 95% */
  }
}

/* Fade animation */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -1rem);
}

.modal.show .modal-dialog {
  transform: none;
}

/* === Modal content box === */
.help-id-modal .modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
  outline: 0;
}

/* === Header, Body, Footer === */
.help-id-modal .modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem;
  border-bottom: 1px solid #dee2e6;
  border-top-left-radius: calc(0.375rem - 1px);
  border-top-right-radius: calc(0.375rem - 1px);
}

.help-id-modal .modal-title {
  margin-bottom: 0;
  line-height: 1.5;
}

.help-id-modal .modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.help-id-modal .modal-footer {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
  border-bottom-right-radius: calc(0.375rem - 1px);
  border-bottom-left-radius: calc(0.375rem - 1px);
}

/* === Close button === */
.help-id-modal .btn-close {
  box-sizing: content-box;
  width: 1em;
  height: 1em;
  padding: 0.25em 0.25em;
  color: #000;
  background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
  border: 0;
  border-radius: 0.375rem;
  opacity: 0.5;
  cursor: pointer;
}

.help-id-modal .btn-close:hover {
  opacity: 0.75;
}

.help-id-modal .btn-close:focus {
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25);
}

/* Optional: very basic button styling so footer looks decent */
.help-id-modal .btn {
  display: inline-block;
  font-weight: 400;
  line-height: 1.5;
  color: #212529;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  background-color: transparent;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: 0.375rem;
  transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.help-id-modal .btn-primary {
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.help-id-modal .btn-primary:hover {
  background-color: #0b5ed7;
  border-color: #0a58ca;
}

.help-id-modal .btn-secondary {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

.help-id-modal .btn-secondary:hover {
  background-color: #5c636a;
  border-color: #565e64;
}

/* If you removed the title, make sure close button stays right-aligned */
.help-id-modal .modal-header .btn-close {
  margin-left: auto; /* extra safety if flex is overridden somewhere */
}
