/* src/dialogs.css */
dialog.ldev-dialog {
  box-sizing: border-box;
  position: fixed;
  width: min(var(--ldev-dialog-default-width, 460px), calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--ldev-dialog-border, #757575);
  border-radius: var(--r-dialog, var(--ldev-ui-radius-dialog, 12px));
  font-family: var(--ldev-ui-font-body, inherit);
  background: var(--ldev-dialog-surface, Canvas);
  color: var(--ldev-dialog-text, CanvasText);
  overflow: hidden;
}
dialog.ldev-dialog.ldev-dialog-wide {
  --ldev-dialog-default-width: 920px;
}
@media (width > 700px) and (not ((height <= 520px) and (pointer: coarse))) {
  dialog.ldev-dialog.ldev-dialog-positioned {
    inset: var(--ldev-dialog-top) auto auto var(--ldev-dialog-left);
    margin: 0;
    max-height: calc(100dvh - var(--ldev-dialog-top));
    max-width: calc(100vw - var(--ldev-dialog-left));
    width: var(--ldev-dialog-width, min(var(--ldev-dialog-default-width, 460px), calc(100vw - 24px)));
    height: var(--ldev-dialog-height, auto);
  }
}
dialog.ldev-dialog::backdrop {
  background: var(--ldev-dialog-backdrop, rgb(0 0 0 / .55));
}
.ldev-dialog .ldev-dialog-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: inherit;
  min-width: 0;
}
.ldev-dialog :is(.ldev-dialog-header, .ldev-dialog-footer) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: 8px;
  padding: 12px 16px;
}
.ldev-dialog .ldev-dialog-footer {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.ldev-dialog .ldev-dialog-title {
  flex: 1;
  margin: 0;
  min-width: 0;
  font-family: var(--ldev-ui-font-heading, inherit);
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}
.ldev-dialog .ldev-dialog-body {
  min-height: 0;
  padding: 0 16px;
  overflow: auto;
  overflow-wrap: anywhere;
}
.ldev-dialog .ldev-dialog-text {
  margin: 0 0 12px;
  white-space: pre-wrap;
}
.ldev-dialog .ldev-dialog-error {
  margin-block: 8px;
  color: var(--ldev-dialog-error, #bb2020);
}
.ldev-dialog .ldev-dialog-error:empty {
  margin: 0;
}
.ldev-dialog .ldev-dialog-button {
  font: inherit;
  color: var(--ldev-dialog-button-text, ButtonText);
  background: var(--ldev-dialog-button, ButtonFace);
  border: 1px solid var(--ldev-dialog-border, #757575);
  border-radius: var(--r-btn, var(--ldev-ui-radius-control, .5rem));
  min-block-size: var(--ldev-ui-control-size, 2.75rem);
  font-size: var(--ldev-ui-label-size, .875rem);
  font-weight: 600;
  padding: 6px 12px;
}
.ldev-dialog .ldev-dialog-button:focus-visible {
  outline: 2px solid var(--ldev-dialog-focus, Highlight);
  outline-offset: 2px;
}
.ldev-dialog .ldev-dialog-button:disabled {
  opacity: .65;
}
.ldev-dialog .ldev-dialog-move {
  cursor: move;
  user-select: none;
  touch-action: none;
}
.ldev-dialog .ldev-dialog-resize {
  position: absolute;
  touch-action: none;
  width: 8px;
  height: 8px;
}
.ldev-dialog .ldev-dialog-resize[data-direction=n] {
  inset: 0 8px auto;
  width: auto;
  cursor: ns-resize;
}
.ldev-dialog .ldev-dialog-resize[data-direction=s] {
  inset: auto 8px 0;
  width: auto;
  cursor: ns-resize;
}
.ldev-dialog .ldev-dialog-resize[data-direction=w] {
  inset: 8px auto 8px 0;
  height: auto;
  cursor: ew-resize;
}
.ldev-dialog .ldev-dialog-resize[data-direction=e] {
  inset: 8px 0 8px auto;
  height: auto;
  cursor: ew-resize;
}
.ldev-dialog .ldev-dialog-resize[data-direction=nw] {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}
.ldev-dialog .ldev-dialog-resize[data-direction=se] {
  bottom: 0;
  right: 0;
  cursor: nwse-resize;
}
.ldev-dialog .ldev-dialog-resize[data-direction=ne] {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}
.ldev-dialog .ldev-dialog-resize[data-direction=sw] {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}
.ldev-dialog-toast {
  position: fixed;
  inset: auto 12px 12px auto;
  max-width: min(360px, calc(100vw - 24px));
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  box-sizing: border-box;
  font-family: var(--ldev-ui-font-body, inherit);
  background: var(--ldev-dialog-toast-surface, CanvasText);
  color: var(--ldev-dialog-toast-text, Canvas);
  pointer-events: none;
  overflow-wrap: anywhere;
}
@media (max-width: 700px), (max-height: 520px) and (pointer: coarse) {
  .ldev-dialog .ldev-dialog-move {
    cursor: auto;
    user-select: auto;
    touch-action: auto;
  }
  .ldev-dialog .ldev-dialog-resize {
    display: none;
  }
}
@media (forced-colors: active) {
  .ldev-dialog-toast,
  dialog.ldev-dialog {
    border: 1px solid CanvasText;
  }
  .ldev-dialog .ldev-dialog-button:focus-visible {
    outline: 3px solid Highlight;
  }
}
