/* Scoped to the shared footer message dialog; other legacy dialogs keep their own layout. */
#myModal.message-modal {
  position: fixed;
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 10050;
  width: min(600px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: 0;
  transform: translate(-50%, -50%);
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 60px rgb(15 23 42 / 24%);
}
body:has(#myModal.message-modal.in) > .modal-backdrop {
  z-index: 10040;
}
#myModal.message-modal *,
#myModal.message-modal *::before,
#myModal.message-modal *::after {
  box-sizing: border-box;
}
#myModal.message-modal .modal-dialog {
  width: 100%;
  margin: 0;
}
#myModal.message-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  border: 0;
  box-shadow: none;
}
#myModal.message-modal .modal-header {
  position: relative;
  flex: none;
  padding: 20px 60px 18px 26px;
  border-bottom: 1px solid #edf0f4;
}
#myModal.message-modal .modal-title {
  margin: 0;
  color: #1f2937;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
#myModal.message-modal .close {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f3f5f8;
  color: #64748b;
  font-size: 24px;
  font-weight: 400;
  line-height: 28px;
  text-shadow: none;
  opacity: 1;
}
#myModal.message-modal .close:hover {
  background: #e8edf3;
  color: #1f2937;
}
#myModal.message-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 22px 26px 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
#myModal .message-form {
  width: 100%;
  margin: 0;
}
#myModal .message-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}
#myModal .message-row > label {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
  text-align: right;
  white-space: nowrap;
}
#myModal .message-required {
  margin-right: 4px;
  color: #d74444;
}
#myModal .message-control {
  display: block;
  width: 100%;
  min-width: 0;
  height: 42px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #d8e0e9;
  border-radius: 6px;
  background: #fff;
  color: #263445;
  font-family: inherit;
  font-size: 14px;
  line-height: 22px;
  box-shadow: none;
}
#myModal .message-control::placeholder {
  color: #9aa5b4;
}
#myModal .message-control:focus {
  border-color: #1684ce;
  outline: 0;
  box-shadow: 0 0 0 3px rgb(22 132 206 / 12%);
}
#myModal .message-region {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
#myModal .message-region select {
  padding-right: 4px;
  padding-left: 8px;
}
#myModal .message-row-textarea {
  align-items: start;
}
#myModal .message-row-textarea > label {
  padding-top: 9px;
}
#myModal textarea.message-control {
  height: 112px;
  min-height: 100px;
  max-height: 180px;
  resize: vertical;
}
#myModal .message-actions {
  padding-left: 102px;
}
#myModal .message-submit {
  min-width: 140px;
  height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: 6px;
  background: #087ac3;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 42px;
  cursor: pointer;
}
#myModal .message-submit:hover {
  background: #0068aa;
}
#myModal .message-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}
#myModal .message-form > [role="status"] {
  margin: 14px 0 0;
  padding-left: 102px;
  font-size: 14px;
  line-height: 22px;
  overflow-wrap: anywhere;
}
#myModal .message-form > [role="status"]:empty {
  display: none;
}
@media (max-width: 480px) {
  #myModal.message-modal .modal-header {
    padding-left: 16px;
  }
  #myModal.message-modal .modal-body {
    padding: 18px 16px 20px;
  }
  #myModal .message-row {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }
  #myModal .message-region {
    gap: 5px;
  }
  #myModal .message-region select {
    padding-right: 0;
    padding-left: 3px;
    font-size: 13px;
  }
  #myModal .message-actions,
  #myModal .message-form > [role="status"] {
    padding-left: 74px;
  }
  #myModal .message-submit {
    width: 100%;
    min-width: 0;
  }
}
