:root {
  --lm-ui-dialog-z: 2147483647;
  --lm-ui-dialog-padding: var(--lm-ui-space-5);
  --lm-ui-dialog-gutter: var(--lm-ui-space-4);
  --lm-ui-dialog-input-font: 16px;
  --lm-ui-dialog-input-height: 112px;
  --lm-ui-select-arrow-size: 12px;
  --lm-ui-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23777' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.lm-dialog-overlay,.lm-dialog-overlay * { box-sizing: border-box; }
.lm-dialog-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--lm-ui-dialog-z);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--lm-ui-dialog-gutter);
  padding-top: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-top,0px));
  padding-right: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-right,0px));
  padding-bottom: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-bottom,0px));
  padding-left: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-left,0px));
  background: var(--lm-ui-overlay);
  color: var(--lm-ui-text);
  font-size: var(--lm-ui-font-body);
  line-height: var(--lm-ui-line);
  letter-spacing: var(--lm-ui-letter-spacing);
}
.lm-dialog-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--lm-ui-dialog-width);
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  background: var(--lm-ui-surface);
  border: var(--lm-ui-border-width) solid var(--lm-ui-border);
  border-radius: var(--lm-ui-radius-dialog);
  box-shadow: var(--lm-ui-dialog-shadow);
  outline: none;
  text-align: left;
}
.lm-dialog-title {
  flex: 0 0 auto;
  margin: 0;
  padding: var(--lm-ui-dialog-padding) var(--lm-ui-dialog-padding) var(--lm-ui-space-3);
  color: var(--lm-ui-text);
  font-size: var(--lm-ui-font-title);
  font-weight: var(--lm-ui-weight-strong);
  line-height: var(--lm-ui-line);
  overflow-wrap: break-word;
}
.lm-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 var(--lm-ui-dialog-padding);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior-y: contain;
}
.lm-dialog-message { white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word; -webkit-user-select: text; user-select: text; }
.lm-dialog-input {
  display: block;
  width: 100%;
  min-height: var(--lm-ui-control-height);
  margin: var(--lm-ui-space-3) 0 0;
  padding: var(--lm-ui-space-3);
  border: var(--lm-ui-border-width) solid var(--lm-ui-border);
  border-radius: var(--lm-ui-radius-control);
  background: var(--lm-ui-input);
  color: var(--lm-ui-text);
  font: inherit;
  font-size: var(--lm-ui-dialog-input-font);
  line-height: var(--lm-ui-line);
  -webkit-user-select: text;
  user-select: text;
}
textarea.lm-dialog-input { min-height: var(--lm-ui-dialog-input-height); resize: vertical; }
.lm-dialog-actions { display: flex; flex: 0 0 auto; padding: var(--lm-ui-space-4) var(--lm-ui-dialog-padding) var(--lm-ui-dialog-padding); }
.lm-dialog-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--lm-ui-control-height);
  padding: var(--lm-ui-space-2) var(--lm-ui-space-3);
  border: 0;
  border-radius: var(--lm-ui-radius-control);
  background: var(--lm-ui-input);
  color: var(--lm-ui-muted);
  font: inherit;
  font-size: var(--lm-ui-font-body);
  font-weight: var(--lm-ui-weight-medium);
  line-height: var(--lm-ui-line);
  text-align: center;
  white-space: normal;
  overflow-wrap: break-word;
  cursor: pointer;
}
.lm-dialog-button+.lm-dialog-button { margin-left: var(--lm-ui-space-3); }
.lm-dialog-confirm { background: var(--lm-ui-selected); color: var(--lm-ui-selected-text); }
.lm-dialog-danger { background: var(--lm-ui-danger-soft); color: var(--lm-ui-danger); }
.lm-dialog-button:active,.lm-dialog-option:active { background: var(--lm-ui-pressed); }
.lm-dialog-button:focus,.lm-dialog-option:focus,.lm-dialog-input:focus { outline: var(--lm-ui-focus-width) solid var(--lm-ui-focus); outline-offset: calc(0px - var(--lm-ui-focus-width)); }
.lm-dialog-option {
  display: block;
  width: 100%;
  min-height: var(--lm-ui-control-height);
  padding: var(--lm-ui-space-3);
  border: 0;
  border-bottom: var(--lm-ui-divider-width) solid var(--lm-ui-border);
  border-radius: var(--lm-ui-radius-small);
  background: var(--lm-ui-surface);
  color: var(--lm-ui-text);
  font: inherit;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
}
.lm-dialog-option[aria-selected="true"] { background: var(--lm-ui-selected); color: var(--lm-ui-selected-text); font-weight: var(--lm-ui-weight-strong); }
.lm-dialog-option:disabled { opacity: var(--lm-ui-disabled-opacity); cursor: default; }
.lm-dialog-option-group,.lm-dialog-empty { padding: var(--lm-ui-space-3); color: var(--lm-ui-muted); font-size: var(--lm-ui-font-meta); }
select[data-lm-dialog-select="1"] { -webkit-appearance: none; appearance: none; cursor: pointer; background-image: var(--lm-ui-select-arrow); background-repeat: no-repeat; background-size: var(--lm-ui-select-arrow-size) var(--lm-ui-select-arrow-size); background-position: right var(--lm-ui-space-3) center; padding-right: var(--lm-ui-space-6); }
select[data-lm-dialog-select="1"]:disabled { cursor: default; }
html.lm-ios.lm-keyboard-open .lm-dialog-overlay { top: var(--lm-visual-page-top,0px); bottom: auto; height: var(--lm-visual-height,var(--lm-app-height,100vh)); }
html.lm-android-overlay-keyboard .lm-dialog-overlay { bottom: auto; height: var(--lm-app-height,100vh); }

html .lm-centered-layer { top: 0; right: 0; bottom: 0; left: 0; align-items: center; justify-content: center; padding: var(--lm-ui-dialog-gutter); padding-top: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-top,0px)); padding-right: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-right,0px)); padding-bottom: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-bottom,0px)); padding-left: calc(var(--lm-ui-dialog-gutter) + var(--lm-safe-left,0px)); background: var(--lm-ui-overlay); box-sizing: border-box; }
html .lm-centered-panel { max-width: var(--lm-ui-dialog-width); max-height: 100%; max-height: min(100%,var(--lm-dialog-legacy-max-height,100%)); min-height: 0; overflow-y: auto; border-radius: var(--lm-ui-radius-dialog); box-sizing: border-box; -webkit-overflow-scrolling: touch; }
html.lm-ios.lm-keyboard-open .lm-centered-layer { top: var(--lm-visual-page-top,0px); bottom: auto; height: var(--lm-visual-height,var(--lm-app-height,100vh)); }
html.lm-app-visual-managed:not(.lm-embedded) body > .lm-dialog-overlay,
html.lm-app-visual-managed:not(.lm-embedded) body > .lm-centered-layer { top: var(--lm-visual-top,0px); }

html .lm-preserved-sheet-panel { max-height: min(var(--lm-dialog-legacy-max-height,100vh),calc(var(--lm-app-height,100vh) - var(--lm-safe-top,0px) - var(--lm-ui-space-4))); min-height: 0; overflow-y: auto; box-sizing: border-box; -webkit-overflow-scrolling: touch; }

html.lm-android-overlay-keyboard .lm-centered-layer { bottom: auto; height: var(--lm-app-height,100vh); }
