/* Ngọc Đức HRM · Cửa sổ hộp thoại và nút đóng. Tách từ bản Apps Script 7.1. */
/* Authorized change: keep the original demo, move only the dialog close control outside its scroller. */
#modal {
  padding: 0 !important;
  overflow: visible !important;
  max-height: none !important;
  max-width: calc(100vw - 56px) !important;
}
#modal > .od-modal-scroll {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-height: 88vh;
  max-height: min(88vh, calc(100dvh - 64px));
  overflow: auto;
  padding: 25px;
  border-radius: inherit;
  overscroll-behavior: contain;
}
#modal > .close {
  position: absolute;
  top: -16px;
  right: -16px;
  float: none;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 3px 12px #0003;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
#modal > .close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
#modal .od-modal-scroll .hr-form {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#modal .od-modal-scroll .hr-form > div {
  min-width: 0;
}
#modal .od-modal-scroll input:not([type="checkbox"]):not([type="radio"]),
#modal .od-modal-scroll select,
#modal .od-modal-scroll textarea {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 680px) {
  #modal .od-modal-scroll .hr-form {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media print {
  #modal {
    max-width: 100% !important;
  }
  #modal > .close {
    display: none !important;
  }
  #modal > .od-modal-scroll {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }
}
