/*
  
  You can customize all of this, this is the default unstyled chat. Most of it is accessibility features & structure.

*/
@keyframes rotate {
  from {
    transform: rotateZ(0deg);
  }
  to {
    transform: rotateZ(360deg);
  }
}
@keyframes pulse {
  from {
    
  }
  to {
    background: transparent;
  }
}
:root {
  --body-color: #FFF;
  --textarea-color: #CCC;
   --dashboard-viewport-width: 300px;
  --dark-main-color: #7700AA;
  --main-color: #DD00FF;
  --main-gradient: linear-gradient(5deg, var(--main-color), var(--dark-main-color));
  --secondary-color: #FFF;
}

@keyframes bump {
  0% {
    transform: translateY(0);
  } 
  25% {
    transform: translateY(2px);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}
body {
  margin: 0;
  max-width: 100vw;
  height: 100vh;
  height: 100svh;
  height: -webkit-fill-available;
  max-height: 100vh;
  max-height: 100svh;
  max-width: 100vw;
  font-family: arial;
  overflow: hidden;
  font-size: 10pt;
  background-color: inherit;
}     
html {
  background-color: transparent;
  height: -webkit-fill-available;
  max-height: 100vh;
  max-height: 100svh;
  max-width: 100vw;
}
div {
  margin: 0;
}
a {
  display: inline;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-all;
  word-break: break-word;
}
@font-face {
  font-family: "VanillaExtract";
  src: url("/media/VanillaExtract.ttf");
}
#input {
  display: block;
  min-height: 15px;
  max-height: 30vh;
  height: auto;
  width: calc(100% - 40px);
  padding: 5px;
  padding-right: 35px;
  margin: 0;
  border: none;
  background-color: var(--textarea-color);
  border-radius: 10px;
  font-family: Arial;
  line-height: 15px;
  overflow-y: auto;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.5) transparent;
}
#input:empty::before {
  content: "Send Message [Enter to send]";
  color: rgba(10, 10, 10, 0.3);
}
#input:active, #input:focus {
  outline: 0;
}
#textInput {
  margin: 0;
  position: relative;
}
#background {
  max-width: 100vw;
  display: block;
  margin: 0;
  height: calc(100% - 54px);
  padding: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.5) transparent;
  box-sizing: border-box;
}
#extraSpace {
  display: none;
}
#main {
  position: relative;
  z-index: 1;
  display: contents;
  all: unset;
  opacity: 0;
}
#loadingScreen {
  background-color: transparent;
  width: 100vw;
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10;
}
#loader {
  width: 50px;
  height: 50px;
  border: solid 5px transparent;
  border-right: solid 5px rgba(0, 0, 0, 0.25);
  border-radius: 50%;
  animation: rotate 500ms ease-in-out infinite;
}
.allMessages {
  margin: 0;
  padding: 5px;
  cursor: pointer;
}

.sent > p, .recieved > p {
  margin: 0;
  padding: 0;
}
.ctxMenuOption:hover {
  background-color: #DDDDDD;
}
.msgWrapper {
  display: block;
  position: relative;
}
.msgBody {
  display: block;
  max-width: 98vw;
  padding: 0;
  margin: 0;
  font-family: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msgBody img:not(.emoji) {
  display: block;
  height: 200px;
  max-width: 100%;
}
.msgBody p {
  display: inline-block;
}
.msgBody a {
  color: inherit !important;
}
.msgBody code, .msgBody pre {
  overflow-x: auto;
  max-width: 100%;
}
.msgBody * {
  margin: 0;
}
:where(#settings) {
  margin: 0;
  cursor: pointer;
  position: fixed;
  right: 5px;
  top: 5px;
  z-index: 5;
  display: inline-block;
  width: 15px;
  height: 15px;
  background-image: url('/media/settings.png');
  background-size: 100% 100%;
}
#settingsWindow {
  height: 90vh;
  width: 100vw;
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  background: rgba(245, 245, 245, 0.10);
  z-index: 6;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
#settingsWindow.hidden {
  z-index: 0;
  pointer-events: none;
  touch-action: none;
}
#settingsWindow > iframe {
  height: 100%;
  width: 100%;
  display: block;
  margin: 0;
  border: none;
  background: transparent;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.senderInfo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-weight: 600;
}
.senderInfo:has(.devTag) > .badge {
  display: none !important;
}
.badge {
  height: 5pt;
  width: 5pt;
  display: inline-block;
  border-radius: 50%;
  user-select: none;
  margin-right: 2px;
}
.mod {
  background-color: #55DD33;
}
.owner {
  background-color: #EE3333;
}
.beta {
  background-color: #007777;
}
:where(#top_banner) {
  width: calc(100% - 15px);
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 15px;
  font-size: 12pt;
  color: #FFF;
  font-family: "VanillaExtract";
  background: var(--main-gradient);
  
}
.ctxMenuOption:hover {
  background-color: #DDD;
}
#nameTipImg {
  max-height: 75px;
  position: fixed;
  right: 25px;
  top: 25px;
}
#nameTip {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
}
#loadMore {
  width: calc(100% - 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12pt;
  font-weight: bold;
  color: inherit;
  cursor: pointer;
  height: 40px;
}
.highlight {
  background-color: rgba(245, 233, 37, 0.75);
  border-radius: 3px;
  padding: 2px;
  animation: pulse 1s ease-in infinite alternate;
}
.erroredImage {
  display: block;
  visibility: hidden;
}
.erroredImage:after {
  content: "Error loading image";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: calc(100% - 50px);
  height: 100%;
  padding: 25px;
  visibility: visible;
  background-color: rgba(200, 200, 200, 0.2);
  color: rgba(200, 200, 200, 0.80);
  text-shadow: 1px 1px 3px #000;
  font-family: inherit;
  font-size: 15pt;
  font-style: italic;
  backdrop-filter: blur(5px);
}
/*
.pinned {
  position: sticky;
  top: 0;
  z-index: 2;
  border-radius: 5px;
  height: 10vh;
  overflow: hidden;
}
.pinned > .allMessages {
  box-shadow: 0 0 5px #F53;
}
.pinned:hover, .pinned:active {
  height: auto;
}
.pinned:after {
  display: inline-block;
  position: absolute;
  right: 2px;
  top: 2px;
  content: "\1F4CC";
}
*/
.pinned:after {
   display: inline-block;
   position: absolute;
   right: 2px;
   top: 2px;
   content: "📌";
}
.tag {
  color: #F00;
  text-shadow: 0 0 3px #F00;
}
#replyBanner {
  position: absolute;
  left: 15px;
  bottom: 100%;
  padding: 3px;
  border-radius: 2px 2px 0 0;
  z-index: 5;
}
#replyBanner > span:last-child {
  margin-left: 5pt;
}
.emoji {
  display: inline !important;
  height: 12pt;
  pointer-events: none;
}
#emojiTray {
  display: none;
  position: absolute;
  left: 0;
  bottom: 100%;
  z-index: 5;
  background-color: #EEE;
  border-top: solid 1px #999;
  width: calc(100% - 20px);
  padding: 10px;
  overflow: hidden;
  max-height: 75vh;

  transition: all 1s ease;
}
:where(#emojiTrayToggle) {
  border: 1pt;
  height: 23px;
  width: 23px;
  position: absolute;
  right: 5px;
  top: 1px;
  z-index: 5;
  cursor: pointer;
  border-radius: 50%;
  background-color: transparent;
  background-image: url(/media/emoji.png);
  background-size: 100% 100%;
}
#emojiGrid {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 0;
}
.emojiInGrid {
  height: 12pt;
  margin: 3px;
  cursor: pointer;
}
#is_typing {
  display: none;
  margin: 5px;
  padding: 0;
  align-items: center;
  justify-content: center;
  height: 10px;
  width: 30px;
  border-radius: 5px;
  overflow: hidden;
  background-color: #EEE;
  gap: 3px;
  position: absolute;
  bottom: calc(100% + 1px);
  left: 1px;
  z-index: 4;
}
#is_typing > span {
  display: inline-block;
  margin: 0;
  background-color: #AAA;
  height: 5px;
  width: 5px;
  border-radius: 50%;
  animation: bump 750ms ease infinite;
}
#is_typing > span:nth-child(1){
  animation-delay: 100ms;
}
#is_typing > span:nth-child(2){
 animation-delay: 200ms;
}
#is_typing > span:nth-child(3){
 animation-delay: 300ms;
}
body:hover #maint {
  opacity: 0;
}
#maint {
  display: none;
  align-items: center;
  justify-content: flex-start;
  background-color: rgba(255, 190, 50, 0.75);
  font-weight: bolder;
  font-size: 10pt;
  color: #333;
  border-radius: 5px;
  border: solid 1px rgba(255, 190, 50, 1);
  box-shadow: 1px 1px 2px rgba(255, 190, 50, 0.75), -1px 1px 2px rgba(255, 190, 50, 0.75), 1px -1px 2px rgba(255, 190, 50, 0.75), -1px -1px 2px rgba(255, 190, 50, 0.75);
  width: calc(90vw - 20px);
  padding: 10px;
  position: fixed;
  left: 5vw;
  top: 5vw;
  z-index: 1000000000000000000000000000000;
  transition: opacity 200ms linear;
  user-select: none;
  pointer-events: none;
  cursor: default;
}
#maint > p {
  margin: 0;
}
#closeSettingsBtn {
  width: 100%; 
  height: 10vh;
  background: rgb(255, 0, 0);
  color: rgb(255, 170, 170);
  font-weight: bolder;
  font-family: arial;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  margin: 0px;
}
#tutorialText {
  font-size: 0.75em;
}
#tutorialShadow {
  height: calc(100vh - 50px);
  width: calc(100vw - 50px);
  padding: 25px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  text-shadow: 0 0 2px #FFF;
  user-select: none;
  font-size: clamp(5pt, 10vw, 75pt);

}
.tutorialFocus {
  box-shadow: 0 0 10px #FFF, 0 0 10px #FFF inset; 
  z-index: 101;
  pointer-events: none;
}
.hidden {
  height: 100px;
  width: 100px;
  position: fixed;
  left: -200px;
  top: -200px;
  opacity: 0;
  pointer-events: none;
}
.material-symbols-outlined {
  font-variation-settings:
  'FILL' 0,
  'wght' 400,
  'GRAD' 0,
  'opsz' 24
}
#onlineUserListWrapper {
  height: 100vh;
  width: 100vw;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  font-family: Arial;
}
#onlineUserList {
  width: 300px;
  max-width: 80vw;
  height: 500px;
  max-height: 90vh;
  background: #FFF;
  border-radius: 3px;
  box-shadow: 1px 1px 3px #000;
  box-sizing: border-box;
  padding: 5px;
  overflow-y: auto;
}
#users {
  margin: 5px;
  border: solid 1px #000;
}
.onlineUser:before {
  content: " ";
  display: inline-block;
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background-color: #0F0;
  vertical-align: middle;
  margin-right: 3px;
}
.yourselfInList:after {
  content: "(You)";
  font-style: italic;
  margin-left: 5px;
} 