
:root {
  --sd-simple-dp-height: 245.2px;
  --sd-simple-dp-ten: 10px;
  --sd-simple-dp-color: #343434;
  --sd-simple-dp-shadow: #4d4d4d8f;
  --sd-simple-dp-code-selection: #add6ff;
  --sd-simple-dp-code-eta-bg: #add6ffcc;
  --sd-simple-dp-row-bg: rgb(200 200 200 / 95%);
}

.dark {
  --sd-simple-dp-shadow: #ecf2f747;
  --sd-simple-dp-code-selection: #264f78;
  --sd-simple-dp-code-eta-bg: #264f78cc;
  --sd-simple-dp-row-bg: rgb(18 18 18 / 95%);;
}

#SD-Simple-DP-Main-Button-txt2img,
#SD-Simple-DP-Main-Button-img2img,
#SD-Simple-DP-Setting-Button,
#SD-Simple-DP-Box,
#SD-Simple-DP-Column {
  --a: 0 0 0 1.5px !important;
  --b: inset 0 0 7px 0 var(--primary-400), 0 0 3px 0 var(--primary-400) !important;
  --c: inset 0 0 4px 0 !important;
  --d: 0 0 1px 0 !important;
  --e: var(--button-secondary-text-color) !important;
}

#SD-Simple-DP {
  display: none;
  overflow: visible;
  position: absolute;
  width: 182px;
  height: auto;
  pointer-events: none;
}

#SD-Simple-DP * {
  pointer-events: auto;
}

#SD-Simple-DP.sd-simple-dp-style {
  display: block;
}

#SD-Simple-DP-Wrap-txt2img,
#SD-Simple-DP-Wrap-img2img {
  overflow: visible;
  position: relative;
}

#SD-Simple-DP-Main-Button-txt2img,
#SD-Simple-DP-Main-Button-img2img {
  padding: 0;
  border: 0;
  box-shadow: none;
}

#SD-Simple-DP-Main-Button-txt2img > svg,
#SD-Simple-DP-Main-Button-img2img > svg {
  fill: var(--e);
  transition: .3s ease;
}

#SD-Simple-DP-Main-Button-txt2img:hover > svg,
#SD-Simple-DP-Main-Button-txt2img.sd-simple-dp-style > svg,
#SD-Simple-DP-Main-Button-img2img:hover > svg,
#SD-Simple-DP-Main-Button-img2img.sd-simple-dp-style > svg {
  fill: var(--primary-500);
}

#SD-Simple-DP-Main-Button-txt2img.sd-simple-dp-style,
#SD-Simple-DP-Main-Button-img2img.sd-simple-dp-style {
  box-shadow: var(--a) var(--primary-400), var(--c) var(--primary-400), var(--d) var(--primary-400);
}

#SD-Simple-DP-Setting-Button {
  display: flex;
  z-index: 9999;
  padding: 0;
  border: 0;
  box-shadow: var(--a) var(--primary-400), var(--c) var(--primary-400), var(--d) var(--primary-400);
  color: var(--primary-400);
  opacity: 0;
  transition: .6s ease, opacity .3s ease, color .3s ease, box-shadow .3s ease;
}

#SD-Simple-DP-Setting-Button:hover {
  box-shadow: var(--a) var(--primary-500), var(--c) var(--primary-500), var(--d) var(--primary-500);
  color: var(--primary-500);
}

#SD-Simple-DP-Setting-Button > svg {
  height: 100%;
  width: 100%;
  transform-origin: center;
  transition: transform 1s ease, stroke .3s ease;
}

#SD-Simple-DP-Box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font);
  font-size: 14px;
  text-align: center;
  position: relative;
  z-index: 9999;
  width: 100%;
  margin: 0;
  padding: 12px 6px;
  opacity: 0;
  border: 0;
  border-radius: var(--sd-simple-dp-ten);
  box-shadow: var(--a) var(--primary-400), var(--b);
  background: var(--background-fill-primary);
  transition: .4s ease;
  will-change: transform;
}

#SD-Simple-DP .sd-simple-dp-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  width: 100%;
  margin-top: 6px;
}

#SD-Simple-DP .sd-simple-dp-label {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  text-align: center;
  pointer-events: none;
  color: var(--primary-400);
  font-size: 14.5px;
  font-weight: bold;
}

#SD-Simple-DP .sd-simple-dp-button {
  --a: 0 0 0 1.5px !important;
  font-weight: normal;
  margin: 0;
  padding: 1px 6px;
  border-radius: 0;
  box-shadow: var(--a) var(--sd-simple-dp-shadow);
  color: var(--body-text-color);
  background: var(--input-background-fill);
  cursor: pointer;
}

#SD-Simple-DP .sd-simple-dp-button:hover {
  box-shadow: var(--a) var(--primary-500);
  color: var(--background-fill-primary);
  background: var(--primary-400);
}

#SD-Simple-DP-Row {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  background: var(--sd-simple-dp-row-bg);
  overflow: visible;
  visibility: hidden;
  transition: opacity .2s ease;
  pointer-events: none;
}

#SD-Simple-DP-Row.sd-simple-dp-style {
  opacity: 1;
  transition: opacity .3s ease;
  pointer-events: auto;
}

#SD-Simple-DP-Column {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sd-simple-dp-ten);
  position: absolute;
  width: 400px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--sd-simple-dp-ten);
  box-shadow: var(--a) var(--primary-400), var(--b), 0 0 10px 1px var(--primary-400);
  background: var(--input-background-fill);
  transform: scale(1);
  overflow: hidden;
}

#SD-Simple-DP-Column.sd-simple-dp-style {
  animation: sd-simple-dp-scaleDown .3s ease forwards;
}

@keyframes sd-simple-dp-scaleDown {
  from { 
    transform: scale(1.3);
    opacity: 0;
  }
  to { 
    transform: scale(1);
    opacity: 1;
  }
}

#SD-Simple-DP-Column.sd-simple-dp {
  animation: sd-simple-dp-scaleUp .2s ease forwards;
}

@keyframes sd-simple-dp-scaleUp {
  from { transform: scale(1); }
  to { transform: scale(1.3); }
}

#SD-Simple-DP-Title {
  font-family: var(--font);
  text-align: center;
  margin: 0;
  margin-bottom: var(--sd-simple-dp-ten);
}

#SD-Simple-DP-Link {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-weight: normal;
  position: absolute;
  bottom: 6px;
  right: 12px;
  height: 24px;
  width: max-content;
  color: var(--body-text-color);
  transition: .3s ease;
  cursor: pointer;
}

#SD-Simple-DP-Link:hover {
  color: var(--primary-500);
}

#SD-Simple-DP-Editor-Column {
  display: flex;
  gap: var(--sd-simple-dp-ten);
}

#SD-Simple-DP-Editor {
  position: relative;
  height: var(--sd-simple-dp-height);
  width: 368px;
  border: 0 !important;
  border-radius: var(--sd-simple-dp-ten);
}

#SD-Simple-DP-Editor > .wrap.default > .eta-bar {
  background: var(--sd-simple-dp-code-eta-bg) !important;
}

#SD-Simple-DP-Editor > div[data-testid='block-label'] {
  display: none !important;
}

#SD-Simple-DP-Editor .codemirror-wrapper {
  position: absolute;
  max-height: var(--sd-simple-dp-height);
  width: 100%;
  border: 0;
  border-radius: var(--sd-simple-dp-ten);
  background: var(--body-background-fill);
  overflow: hidden;
}

#SD-Simple-DP-Editor .codemirror-wrapper > .cm-editor {
  padding-right: 1.5px;
}

#SD-Simple-DP-Editor .cm-scroller > .cm-gutters {
  min-width: 36px;
  margin-right: 2px;
  border-width: 2px;
  border-color: var(--sd-simple-dp-color);
  cursor: default;
}

#SD-Simple-DP-Editor .cm-scroller > .cm-gutters > .cm-lineNumbers {
  padding-left: 5px;
}

#SD-Simple-DP-Editor .cm-scroller > .cm-gutters > .cm-lineNumbers > .cm-gutterElement {
  padding: 0 3px 0 4px;
}

#SD-Simple-DP-Editor .cm-scroller > .cm-content {
  pointer-events: auto;
}

#SD-Simple-DP-Editor .cm-scroller .cm-selectionBackground {
  background-color: var(--sd-simple-dp-code-selection) !important;
}

#SD-Simple-DP-Column > #SD-Simple-DP-Markdown {
  padding: 0 !important;
  cursor: default;
}

#SD-Simple-DP-Column > #SD-Simple-DP-Markdown > pre {
  line-height: 1.3;
  font-family: var(--font);
  font-size: 13px;
  margin: 0;
}

#SD-Simple-DP-Editor-Frame {
  --a: inset 0 0 0 1.5px !important;
  position: absolute;
  z-index: 3;
  height: 100%;
  width: 100%;
  border: 0;
  border-radius: var(--sd-simple-dp-ten);
  box-shadow: var(--a) var(--sd-simple-dp-color);
  pointer-events: none;
  transition: box-shadow .2s ease;
}

#SD-Simple-DP-Editor-Frame.sd-simple-dp-style {
  box-shadow: var(--a) var(--primary-500), 0 0 8px 0 var(--primary-500);
}

#SD-Simple-DP-Exit-Setting-Button,
#SD-Simple-DP-Example-Close-Button,
#SD-Simple-DP-Example-Display-Button {
  font-family: var(--font);
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  height: 40px;
  width: 40px;
  padding: 4px;
  border: 0;
  border-bottom-left-radius: 12px;
  box-shadow: 0 0 3px 1px #000;
  color: var(--primary-400);
  background: var(--input-background-fill);
  transition: .2s ease;
  cursor: pointer;
}

#SD-Simple-DP-Example-Display-Button,
#SD-Simple-DP-Example-Close-Button {
  display: flex;
  align-items: center;
  justify-content: center;
  top: 1px;
  right: 1px;
  height: 30px;
  width: 30px;
  border-bottom-left-radius: var(--sd-simple-dp-ten);
}

#SD-Simple-DP-Exit-Setting-Button > svg,
#SD-Simple-DP-Example-Close-Button > svg {
  --a: drop-shadow(0 0 1px rgb(0 0 0 / 50%)) !important;
  filter: var(--a) var(--a) var(--a);
}

#SD-Simple-DP-Exit-Setting-Button:hover,
#SD-Simple-DP-Example-Close-Button:hover {
  color: #fff !important;
  background: red;
  filter: drop-shadow(0 0 2px red);
}

#SD-Simple-DP-Example-Display-Button:hover {
  color: var(--body-background-fill);
  background: var(--primary-500);
}

#SD-Simple-DP-Example-Info {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  position: absolute;
  top: 0;
  z-index: 2;
  height: 100%;
  width: 100%;
  padding: 3px var(--sd-simple-dp-ten);
  margin: 0;
  border: 0;
  border-radius: var(--sd-simple-dp-ten);
  background: var(--background-fill-primary);
  overflow: hidden;
  cursor: default;
}

#SD-Simple-DP-Example-Info > pre {
  width: 100%;
  margin: 0;
  color: var(--body-text-color);
}

#SD-Simple-DP-Save-Button {
  --a: inset 0 0 1px 1px var(--primary-500), 0 0 3px 0 #000 !important;
  outline: none;
  line-height: 1;
  font-size: 20px;
  font-weight: normal;
  width: 100px;
  padding: var(--sd-simple-dp-ten);
  border: 0;
  border-radius: var(--sd-simple-dp-ten);
  box-shadow: inset 0 0 12px 3px var(--primary-500), var(--a);
  color: var(--body-text-color);
  background: transparent;
  transition: .3s ease;
}

#SD-Simple-DP-Save-Button:hover {
  box-shadow: inset 0 0 20px 5px var(--primary-500), var(--a);
  color: var(--primary-500);
  background: var(--input-background-fill);
}

#SD-Simple-DP-Save-Button.sd-simple-dp-style {
  opacity: .5;
  pointer-events: none;
}