.iron-text-preview {
  width: 100%;
  max-width: 42rem;
}

.iron-text-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.iron-text-preview-toolbar .form-check {
  min-height: 0;
  margin: 0;
}

.iron-text-preview-toolbar .form-check-label {
  color: var(--mist);
  font-size: 0.78rem;
  font-weight: 400;
}

.iron-text-preview-toolbar [data-iron-text-open] {
  display: grid;
  place-items: center;
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
}

.iron-text-preview-popup-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.iron-text-preview-content {
  width: 100%;
  height: var(--iron-text-preview-height);
  max-height: var(--iron-text-preview-height);
  margin: 0;
  padding: 1rem;
  border: 1px solid rgb(from var(--white-border) r g b / 25%);
  border-radius: 0.18rem;
  background: #020606;
  color: var(--mist);
  font: 0.82rem/1.55 ui-monospace, SFMono-Regular, Consolas, monospace;
  box-sizing: border-box;
  overflow: auto;
  white-space: pre;
}

.iron-text-preview-content.wrap-lines {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.iron-text-preview-dialog {
  width: min(94vw, 1100px);
  max-width: 94vw;
  height: 92vh;
  max-height: 92vh;
  padding: 3rem 1rem 1rem;
  border: 1px solid rgb(from var(--white-border) r g b / 35%);
  border-radius: 0.18rem;
  background: linear-gradient(145deg, #10201e, #071110);
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

.iron-text-preview-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(3px);
}

.iron-text-preview-popup-content {
  height: 100%;
  max-height: 100%;
}

.iron-text-preview-close {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font: 1.5rem/1 Arial, sans-serif;
}

.iron-text-preview-close:hover {
  background: rgba(255, 255, 255, 0.08);
}
