:root {
  --test-hsl: 0, 0%, 6%;
  --text: hsla(var(--test-hsl), 1);
  --text-trans: hsla(var(--test-hsl), 0.3);

  --text2-hsl: 0, 0%, 32%;
  --text2: hsla(var(--text2-hsl), 1);
  --text2-trans: hsla(var(--text2-hsl), 0.3);

  --background-hsl: 0, 0%, 100%;
  --background: hsla(var(--background-hsl), 1);
  --background-full-transparent: hsla(var(--background-hsl), 0);
  --background-translucent: hsla(var(--background-hsl), 0.5);
  --background-overlay: hsla(var(--background-hsl), 0.33);

  --light0-hsl: 0, 0%, 92%;
  --light0: hsla(var(--light0-hsl), 1);
  --light0-trans: hsla(var(--light0-hsl), 0.5);
  --light-hsl: 0, 0%, 88%;
  --light: hsla(var(--light-hsl), 1);
  --light-trans: hsla(var(--light-hsl), 0.5);
  --light2-hsl: 0, 0%, 84%;
  --light2: hsla(var(--light2-hsl), 1);
  --light2-trans: hsla(var(--light2-hsl), 0.5);

  --accent: 219, 100%, 64%;

  --grey: #868e96;
  --pink: #f472d0;
  --yellow: #ffb638;
  --blue: #007aff;
  --red: #ee204d;
  --green: #00c805;

  --google: #ff3e30;
  --youtube: #ff0000;
  --twitter: #08a0e9;
  --github: #24292e;

  --warning: #f0ad4e;
  --live: #dc143c;

  --orange: #e69500;
  --orange-rgb: 230, 149, 0;
  --green: #71a436;
  --green-rgb: 113, 164, 54;

  --top-padding: 0px;

  --max-page-width: 1400px;

  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-theme='dark'] {
  --text: #f4f5f6;
  --text2: #878787;
  --background: #111111;
  --background-full-transparent: rgba(17, 17, 17, 0);
  --background-translucent: rgba(17, 17, 17, 0.5);
  --background-overlay: rgba(17, 17, 17, 0.33);

  --light0: hsl(0, 0%, 8%);
  --light0-trans: hsla(0, 0%, 8%, 0.5);
  --light: hsl(0, 0%, 11%);
  --light-trans: hsla(0, 0%, 11%, 0.5);
  --light2: hsl(0, 0%, 16%);
  --light2-trans: hsla(0, 0%, 16%, 0.5);
}

@media (max-width: 768px) {
  :root {
    --top-padding: 0px;
  }
}

*:not(svg path) {
  /* font-family: 'Public Sans', sans-serif; */
  font-family: 'Inter', sans-serif;
  font-family: 'Figtree', 'Inter', sans-serif;
  /* font-family: 'Lato', sans-serif; */
  /* color: var(--text); */
}

body {
  background: var(--background);
  color: var(--text);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html,
body {
  scroll-behavior: smooth;
}

a {
  color: inherit;
}

input,
button {
  -webkit-appearance: none;
}

.warnings {
  position: fixed;
  bottom: 0.25rem;
  left: 0.25rem;
  background: none !important;
  color: transparent !important;
  display: flex;
  align-items: flex-end;
  user-select: none;
  border: none !important;
}

.warning {
  /* position: fixed;
  bottom: .25rem;
  left: .25rem; */
  background: none !important;
  color: transparent !important;
  display: flex;
  align-items: center;
  user-select: none;
  pointer-events: none;
  border: none !important;
  height: 1.5rem !important;
}

.warning::before {
  content: '';
  /* background: var(--red); */
  border-radius: 50%;
  margin: 5px;
  height: 10px;
  width: 10px;
  /* box-shadow: 0 0 0 0 rgba(238, 32, 77, 1); */
  transform: scale(1);
  animation: pulse 2s infinite;
}

.warning::after {
  margin: 3px;
  white-space: nowrap;
  content: '';
  /* color: var(--red); */
  font-weight: 600;
  font-size: 12px;
}

.warning[data-warning='dev']::before {
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(238, 32, 77, 1);
}

.warning[data-warning='dev']::after {
  content: 'Dev Instance';
  color: var(--red);
}

.warning[data-warning='offline']::before {
  background: var(--yellow);
  box-shadow: 0 0 0 0 hsla(38, 100%, 61%, 1);
}

.warning[data-warning='offline']::after {
  content: 'Network Offline';
  color: var(--yellow);
}

@keyframes fading {
  0% {
    opacity: 1;
  }

  70% {
    opacity: 0.3;
  }

  100% {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(238, 32, 77, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(238, 32, 77, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(238, 32, 77, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* .main, #svelte {
  background: rgba(0, 200, 5, .1);
  width: 100%;
  height: 100%;
} */

.frame {
  position: relative;
  max-width: var(--max-page-width);
  margin: auto;
  width: 100%;
  min-height: 100vh;
  padding-top: var(--top-padding);
  /* background: rgb(0, 122, 255, .1);
  max-width: 100vw;
  width: 100vw; */
}

.frame > main,
.frame > .page-view,
.frame > .view {
  width: 100%;
  padding: 0.5rem 1rem;
  max-width: var(--max-page-width);
  background: var(--background);
}

.frame > .page-view {
  padding: 0;
}

.frame > * {
  position: absolute !important;
  top: var(--top-padding);
  left: 0;
  min-height: calc(100vh - var(--top-padding));
}

.frame > .page-view > * {
  min-height: calc(100vh - var(--top-padding));
}

.frame > *:not(.splashscreen):nth-child(1) {
  position: relative !important;
  top: auto;
  left: auto;
}

.frame > .splashscreen {
  margin-top: calc(var(--top-padding) * -1);
  z-index: 4;
}

.frame > .modal {
  position: fixed !important;
  min-height: calc(100% - var(--top-padding));
}

.noDisplay {
  display: none !important;
}

.heading-surtitle {
  color: var(--text) !important;
}

.heading span {
  margin-left: 0.3rem;
}

.heading span > span > span {
  font-size: 11px;
  margin-left: 0.25rem;
}

.heading .inactive {
  color: var(--red);
}

.heading .active {
  color: var(--green);
}

.pre {
  font-size: 13px;

  overflow: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.hidden {
  display: none !important;
}

/* Buttons */

a {
  outline-color: #ccc;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: var(--background);
  cursor: pointer;

  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  transition: all ease 300ms;
  outline-color: #ccc;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: var(--background);
  cursor: pointer;

  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 3px;
  padding: 8px 16px;
  transition: all ease 300ms;
  outline-color: #ccc;
}

button.medium,
.button.medium {
  font-size: 14px;
  padding: 6px 12px;
}

button.small,
.button.small {
  font-size: 12px;
  padding: 4px 10px;
}

button.seamless,
.button.seamless {
  background: none;
  border: none;
  color: var(--text);
  outline-color: #ccc;
}

button:disabled,
.button:disabled {
  background: #ccc;
}

button.alt,
.button.alt {
  color: var(--text);
  background: none;
  border: 1px solid var(--text);
}

/* Inputs */

.text-input {
  padding: 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
  border: 1px solid #cccccc;
  border-radius: 3px;
  background: none;
}

.text-input.slim {
  padding: 4px 6px;
}

.text-input.thin {
  padding: 2px 4px;
  font-size: 13px;
}

.text-input.seamless {
  border: 0;
  background: none;
  outline: none;
}

.text-input:hover,
.text-input:focus {
  border: 1px solid var(--light2);
}

.text-input.seamless:hover,
.text-input.seamless:focus {
  border: 0;
}

.text-input:disabled {
  background: #efefef;
}

.text-input.seamless:disabled {
  background: none;
}

.text-input.issue,
.text-input[data-issue] {
  border-color: crimson;
}

select,
.select-input {
  border: none;
  width: fit-content;
}

select.seamless,
.select-input.seamless {
  outline-color: #ccc;
}

/* Lists */

.list,
.list-header,
.list-container,
.list-item {
  position: relative;
  width: 100%;
}

.list-header {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-weight: 500;
  font-size: 13px;
  color: #444;
  border: 0.5px solid #bbbbbb;
  margin-bottom: 8px;
  border-radius: 2px;
  padding: 4px 6px;
}

.list-heading {
  font-weight: 600;
  font-size: 13px;
  line-height: 16px;
  color: #999999;
  width: 100%;
  margin-bottom: 6px;
  text-decoration: underline;
}

.list-item {
  position: relative;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 4px 8px;
  height: 28px;
  width: 100%;
  font-weight: 500;
  font-size: 13px;
  color: #444;
  transition: all ease 300ms;
}

.list-item:hover {
  cursor: pointer;
  background: rgba(187, 187, 187, 0.2);
}

/* Misc */
[hidden='true'] {
  display: none !important;
}

[visible='false'] {
  visibility: none !important;
}

[async]::after,
[async-spinner]::after,
[async-spinner='true']::after,
.async-spinner::after {
  margin: auto;
  content: '';
  display: flex;
  align-items: center;
  place-items: center;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  /* border: 2px solid #ddd; */
  border: 2px solid color-mix(in srgb, var(--text, currentColor), transparent 65%);
  border-top-color: #333;
  animation: spin 1s infinite cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

[async-spinner='centered'] {
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

[async][working='true'],
[async-spinner][working='true'],
.async-spinner[working='true'] {
  pointer-events: none !important;
}

[async][working='true'] > *,
[async-spinner][working='true'] > *,
.async-spinner[working='true'] > * {
  display: none !important;
}

[async]:not([working='true'])::after,
[async-spinner]:not([working='true'])::after,
.async-spinner:not([working='true'])::after {
  display: none !important;
}

[before-text]::before {
  content: attr(before-text);
}

[after-text]::after {
  content: attr(after-text);
}

[before-transparent='true']::before {
  opacity: 0;
}

[after-transparent='true']::after {
  opacity: 0;
}

[before-transition-ease='true']::before {
  transition: all ease 300ms;
}

[after-transition-ease='true']::after {
  transition: all ease 300ms;
}

[errored] {
  color: crimson !important;
}

/* Modal */
.modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 42069 !important;
}

@media (max-width: 540px) {
  .modal {
    justify-content: flex-end;
  }
}

.modal-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--background-overlay);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: background ease 150ms, backdrop-filter ease 150ms;
}

.modal-container {
  z-index: 2;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  border-radius: 8px;
  background: var(--background);
  max-width: calc(100% - 2rem);
  max-height: 80%;
  border: 1px solid var(--light);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1), 0 0 10px rgba(255, 255, 255, 0.1), 0 0 2px rgba(255, 255, 255, 0.1),
    0 0 5px rgba(255, 255, 255, 0), 0 0 1px rgba(255, 255, 255, 0), 0 0 40px rgba(255, 255, 255, 0),
    0 0 1px rgba(255, 255, 255, 0), 0 0 1px rgba(255, 255, 255, 0);
}

@media (max-width: 540px) {
  .modal-container {
    width: 100%;
    padding-bottom: 2rem;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
    min-height: 220px;
    max-width: 100%;
  }
}

.modal-helptext {
  font-size: 13px;
  color: var(--text2);
  margin-top: 0.5rem;
  text-align: center;
}

.modal-container p {
  text-align: center;
}

.modal-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.modal-icon svg {
  max-width: 40px;
  max-height: 40px;
  height: auto;
  width: auto;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transform: scale(1);
  opacity: 0.7;
  transition: all ease 300ms;
  display: none;
}

.modal-close:hover {
  opacity: 1;
  transform: scale(1.05);
}

@keyframes fade-in {
  from {
    opacity: 0;
    filter: blur(2px);
    /* optional: slight rise */
    /* transform: translateY(10px); */
  }
  to {
    opacity: 1;
    filter: blur(0px);
    /* transform: translateY(0); */
  }
}

[transition='fade-in'] {
  opacity: 0; /* fallback if animation doesn't run */
  animation: fade-in 300ms ease-out forwards;
}

[transition='loading'] {
  filter: blur(2px);
  transition: filter ease 300ms;
  pointer-events: none;
}

/* Toast notification styling */
body > [toast] {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  opacity: 0;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
  z-index: 1000;
  max-width: 90%;
  background: #5434ec;
  border-radius: 100vmax;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  min-width: 180px;
  gap: 0.5rem;
  width: fit-content;
  margin: auto;
  padding: 0.33rem 1.5rem;

  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -3%;
}

/* Toast type color variations */
body > [toast][success] {
  background-color: #10b981; /* emerald-500 */
}

body > [toast][error] {
  background-color: #f43f5e; /* rose-500 */
}

body > [toast][info] {
  background-color: #5434ec; /* sky-500 */
}

body > [toast][show] {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
