@import url("/css/modules/prism-light.min.css") (prefers-color-scheme: light);
@import url("/css/modules/prism-dark.min.css") (prefers-color-scheme: dark);
@import url("/css/modules/markdown-document.css");
@import url("/css/fonts/cascadia-mono/font.css");

main {
	padding: 0;
	display: flex;
	flex-flow: column;
	flex: 1 1 auto;
}

.information {
	padding: 20px;
	padding-bottom: 0;
	flex: 0 0 80px;
}

#displayName {
	font-size: 1.2rem;
}
#displayName[disabled] {
  box-sizing: border-box;
	font-size: 1.2rem;
  background: none;
  border: none;
	border-bottom: 1px solid transparent;
}

#password {
	font-size: 1rem;
  width: fit-content;
}

#userName {
	font-size: 1rem;
	opacity: 70%;
}

#verified {
	margin-left: 10px;
	display: inline-block;
}

#noteCount {
	font-size: 0.9rem;
	opacity: 70%;
}

#tabs {
	display: flex;
	flex-flow: column;
	flex: 1 1 auto;
}

#tab {
  position: sticky;
  top: 0px;
	display: flex;
	flex: 0 0 50px;
  background: var(--background);
  z-index: 9;
  transition: all 200ms;
}

header::before {
  background: var(--background) !important;
  mask-image: unset !important;
}

#tab::after {
  --width: 100px;
  content: '';
  display: block;
  position: absolute;
  bottom: 3px;
  box-sizing: border-box;
  width: var(--width); height: 4px;
  border-radius: 2px;
  margin-left: calc(25% - var(--width) / 2);
  background: var(--tab-selected-border-color);
  transition: left 500ms ease;
}

#tabs[data-opening="notes"] #tab::after {
  left: 0;
}
#tabs[data-opening="about"] #tab::after {
  left: 50%;
}

#tab a {
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	transition: transform 100ms ease 50ms;
	flex: 1 1 auto;
  cursor: pointer;
}
#tab a:active {
	transform: scale(0.8);
  transition: transform 100ms ease;
}

#tab-content {
  display: grid;
  position: relative;
	flex: 1 1 0;
  overflow-x: hidden;
	overflow-y: auto;
}

#tab-content > * {
  grid-column-start: 1;
  grid-row-start: 1;
  transition: transform 500ms ease, opacity 500ms ease;
  box-sizing: border-box;
  width: 100vw;
}

#tab-content--notes {
	padding: 15px;
  overflow: auto;
  padding-bottom: 60px;
}
#tab-content--notes:empty {
	display: flex;
	justify-content: center;
}

#tab-content--notes:has(.note)::after {
  content: '';
  position: absolute;
  height: 60px;
  background-image: linear-gradient(transparent, var(--background));
  left: 0; right: 0; bottom: 0;
  touch-action: none;
  pointer-events: none;
}
#tab-content--notes:not(:has(.note))::after {
	content: 'Empty';
	display: block;
	text-align: center;
	background-image: linear-gradient(90deg, royalblue 40%, magenta, rgba(255, 0, 255, 50%), royalblue);
	background-clip: text;
	color: transparent;
	width: fit-content;
	margin: auto;
	font-weight: 100;
	font-size: 4em;
	font-stretch: condensed;
  animation: sliding-background 1s linear infinite;
}

@keyframes sliding-background {
  from {
    background-position-x: 0px;
  }
  
  to {
    background-position-x: 147px;
  }
}


#tab-content--about {
	display: flex;
	flex-flow: column;
}

#tab-content--about #bio {
	padding: 15px 30px;
	height: 0;
	overflow: auto;
	flex: 1 1 auto;
}

#bio--edit {
  display: flex;
  gap: .5em;
  align-items: center; justify-content: center;
  font-size: 0.8em;
  width: fit-content; height: 20px;
  margin: auto;
  padding-inline: .5em;
  color: var(--tab-border-color);
  border: 1px solid var(--tab-border-color);
  border-radius: 3px;
  cursor: pointer;
  z-index: 50;
}
#bio--edit * {
  color: inherit;
}

.prompt.prompt-about {
  align-self: center;
  margin: unset;
  width: calc(100svw - 40px); max-width: unset;
  height: calc(100svh - 40px);
}

#prompt-about-input-wrapper {
  display: grid;
  background: var(--editor-background);
  overflow: auto;
  flex: 1 0;
}

#prompt-about-input-wrapper * {
  font-family: "Cascadia Mono", monospace !important;
  font-variant-ligatures: none !important;
}

#about-editor-input, #prompt-about-input-wrapper pre {
  background: transparent;
  font-size: 0.8rem;
  tab-size: 4;
  margin: 0;
	padding: 10px 20px;
  text-wrap: nowrap;
  white-space: pre;
  outline: none !important;
  line-height: 180%;
  
  grid-column-start: 1;
  grid-row-start: 1;
}

#about-editor-input {
  color: transparent;
  display: block;
  border: none;
  caret-color: var(--text-color);
  resize: none;
}

#about-editor-view, #about-editor-view * {
  background: transparent;
  text-shadow: none !important;
}
pre, pre * {
  color: unset;
}

#tab-content--about #information {
	display: flex;
	padding: 10px 15px;
	background: var(--background);
	border-top: 1px solid var(--tab-border-color);
	flex: 0 0 auto;
}

#tab-content--about #information * {
	font-size: 0.9rem;
	opacity: 80%;
	flex: 1 1 auto;
}

#tab-content--about #information #registered::before {
  content: 'Registered on ';
  opacity: 50%;
  font-stretch: condensed;
}

#tab-content--about #information #noteCount {
	text-align: right;
}


#tabs[data-opening="about"] #tab-content--notes {
  transform: translateX(-100%);
  opacity: 0;
}
#tabs[data-opening="notes"] #tab-content--about {
  transform: translateX(100%);
  opacity: 0;
}


#add-note-button {
	position: absolute;
	display: flex;
	place-items: center;
  background: var(--action-background);
  color: var(--content-text-color);
	bottom: 10px; left: 50%; transform: translate(-50%, 0);
	border: 1px solid var(--content-text-color);
  border-radius: 40px;
	height: 40px;
  gap: 10px;
  padding-inline: 20px;
  transition: all 100ms ease;
  z-index: 1;
}
#add-note-button * {
  color: inherit;
}

#saveEdit, #saveEdit.opened {
	position: fixed;
  display: flex;
  gap: .5em;
  font-weight: 700;
  font-stretch: condensed;
  align-items: center; justify-content: center;
  bottom: 0;
  left: 10px; right: 10px;
  height: 30px;
	transform: translateY(100%);
  margin-bottom: 10px;
  border-radius: 5px;
  box-sizing: border-box;
	background: var(--tab-selected-border-color);
	animation: popup 200ms ease forwards;
	cursor: pointer;
  z-index: 99999;
}
#saveEdit, #saveEdit * {
  color: white;
}

#saveEdit.wait {
  filter: brightness(0.8);
}

#saveEdit.closed {
  touch-action: none;
  pointer-events: none;
  filter: brightness(0.8);
	animation: popdown 200ms ease forwards;
}

/* HOVER EFFECTS */
@media (hover: hover) {
	#add-note-button:hover {
    transform: translate(calc(-2px - 50%), -2px);
    box-shadow: 2px 2px 0 0 var(--action-shadow-color);
	}
}

/* ACTIVE ELEMENTS */
#add-note-button:active {
  transform: translate(-50%, 0);
  box-shadow: 0 0 0 3px var(--action-shadow-color);
}

/* KEYFRAMES */
@keyframes popup {
	from {
    transform: translateY(100%);
    opacity: 0;
	}
	to {
    transform: translateY(0%);
    opacity: 1;
	}
}

@keyframes popdown {
	from {
		transform: translateY(0%);
    opacity: 1;
	}
	to {
    transform: translateY(100%);
    opacity: 0;
	}
}