/* ARBITEX V60 — visible, usable close controls for all site dialogs.
 * Safe overlay stacking over the mobile site header (z-index 61/62),
 * sticky X inside scrollable React dialogs, legacy consultation / article dialogs.
 * No form-submit, analytics or navigation handlers are touched here.
 */
[data-slot="dialog-overlay"] {
  z-index: 120 !important;
}
[data-slot="dialog-content"] {
  z-index: 121 !important;
  overscroll-behavior: contain;
}
/* React/Base UI always puts the close control last in the markup. Place it
   visually first so sticky positioning works even when the form scrolls. */
[data-slot="dialog-content"] > [data-slot="dialog-close"] {
  position: sticky !important;
  order: -1;
  top: 0 !important;
  right: 0 !important;
  justify-self: end;
  align-self: start;
  z-index: 3 !important;
  width: 44px !important;
  height: 44px !important;
  min-height: 44px;
  margin: 0 0 -44px auto !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #082a5e !important;
  border: 1px solid #c9d8eb !important;
  box-shadow: 0 2px 9px rgba(8, 42, 94, .18) !important;
  -webkit-tap-highlight-color: transparent;
}
[data-slot="dialog-content"] > [data-slot="dialog-close"] svg {
  width: 21px !important;
  height: 21px !important;
  stroke-width: 2.3;
}
[data-slot="dialog-content"] > [data-slot="dialog-header"] {
  padding-right: 46px;
}
/* The standalone liquidation form and article consultation use their own
   scrollable panels rather than the shared React component. */
.arbitex-static-dialog__panel,
.hub-modal {
  max-height: calc(100dvh - 24px) !important;
  overscroll-behavior: contain;
}
.arbitex-static-dialog__close,
.hub-modal-close {
  position: sticky !important;
  top: 0 !important;
  right: 0 !important;
  z-index: 3 !important;
  display: block !important;
  float: right;
  margin: 0 0 -44px auto !important;
  width: 44px !important;
  min-width: 44px;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: 999px !important;
  background: #fff !important;
  color: #082a5e !important;
  border: 1px solid #c9d8eb !important;
  box-shadow: 0 2px 9px rgba(8, 42, 94, .18) !important;
  -webkit-tap-highlight-color: transparent;
}
.arbitex-static-dialog__title,
.hub-modal > h2:first-of-type {
  padding-right: 45px;
}
@media screen and (max-width: 767.98px) {
  [data-slot="dialog-content"] {
    max-height: calc(100dvh - 20px) !important;
    max-width: calc(100% - 24px) !important;
  }
  .arbitex-static-dialog {
    padding: 10px !important;
  }
  .arbitex-static-dialog__panel,
  .hub-modal {
    max-height: calc(100dvh - 20px) !important;
  }
}
