/* style.css */

:root {
  --bgColor: #18181C;
  --fontColor: rgb(244, 244, 244);
  --emboseBgColor: #21222D;
  --searchBgColor: rgba(255, 255, 255, 0.113);
  --fontStyle: "Recursive", sans-serif;

  --bg-main: #1c1c1d;
  --bg-sidebar: #0d0e0f;
  --bg-card: #101111;
  --accent-emerald: #238636;
  --accent-emerald-hover: #2ea043;
  --accent-blue: #9123ff;
  --text-main: #e6edf3;
  --text-dim: #8b949e;
  --border-color: #30363d;
  --border-glow: rgba(88, 166, 255, 0.3);

  --uploadBg: #303138;
  --uploadBr: #797778;
}

.darkTheme {
  /* --fontStyle: "Duru Sans"; */
  --bgColor: rgb(244, 244, 244);
  --fontColor: black;
  --emboseBgColor: rgb(231, 242, 254);
  --searchBgColor: rgb(244, 244, 244);
}

*::-webkit-scrollbar {
  display: none;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--fontStyle);
}

.cursorPointer {
  cursor: pointer;
}

.material-symbols-rounded {
  font-variation-settings: 'FILL'1,
    'wght'700,
    'GRAD'0,
    'opsz'24
}

/* From Uiverse.io by LightAndy1 */
.group {
  display: flex;
  line-height: 28px;
  align-items: center;
  position: relative;
  max-width: 190px;
}

.input {
  font-family: "Montserrat", sans-serif;
  width: 100%;
  height: 45px;
  padding-left: 2.5rem;
  box-shadow: 0 0 0 1.5px #2b2c37, 0 0 25px -17px #000;
  border: 0;
  border-radius: 12px;
  background-color: #16171d;
  outline: none;
  color: #bdbecb;
  transition: all 0.25s cubic-bezier(0.19, 1, 0.22, 1);
  cursor: text;
  z-index: 0;
}

.input::placeholder {
  color: #bdbecb;
}

.input:hover {
  box-shadow: 0 0 0 2.5px #2f303d, 0px 0px 25px -15px #000;
}

.input:active {
  transform: scale(0.95);
}

.input:focus {
  box-shadow: 0 0 0 2.5px #2f303d;
}

#docs .material-symbols-rounded {
  font-variation-settings: 'FILL'1, 'wght'400, 'GRAD'0, 'opsz'24;
  font-size: 1.95rem;
}



body {
  height: 100vh;
  padding: 20px;
  display: flex;
  gap: 20px;
  background-color: var(--bgColor);
  color: var(--fontColor);
}

#mainSection {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  width: calc(100% - 340px);
}

.icon {
  font-size: 1.75rem;
}

/* Sidebar CSS */
#sideBar {
  background-color: var(--emboseBgColor);
  height: calc(100vh - 40px);
  border-radius: 1em;
  width: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#sideBar>div:nth-child(1)>div,
#sideBar>div:nth-child(2)>div {
  padding: 1em 0.5em;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5em;
  font-family: var(--fontStyle);
}

#logoContainer {
  margin-bottom: 3em;
}

#logoContainer span {
  font-size: 1.5rem;
}

.sections {
  border-radius: 10px;
}

.active {
  background-color: rgba(0, 0, 0, 0.3);
}

.active>.icon {
  color: #804ffc;
}

#sideBar #logoContainer img {
  width: 60px;
}

#sideBar>div {
  padding: 1em;
}

#toolBar {
  background-color: var(--emboseBgColor);
  padding: 1em;
  border-radius: 1em;
  font-size: var(--fontStyle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#toolBar>div:nth-child(2) {
  display: flex;
  gap: 2.25em;
}

#searchBar {
  width: calc(660px + 3em);
  height: 2em;
  background-color: var(--searchBgColor);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  border: 1px solid var(--text-dim);
  border-radius: 0.5em;
  padding: 1.5em;
  margin-left: 40px;
  font-family: var(--fontStyle);
}

#searchBar p {
  font-size: 1rem;
}

#searchInput {
  outline: none;
  border: none;
  width: 90%;
  background-color: transparent;
  height: 40px;
  font-size: larger;
  COLOR: var(--fontColor);
  padding-left: 2em;
}

.searchInput::placeholder {
  color: var(--text-dim);
}

.searchBar {
  width: 40%;
  position: relative;
}

.search-icon {
  position: absolute;
  /* left: 1rem; */
  fill: var(--text-dim);
  width: 1.75rem;
  height: 1.75rem;
  pointer-events: none;
  z-index: 1;
}

#theme {
  padding: 0.5em;
  display: flex;
  align-items: center;
  border-radius: 50%;
  /* border: 1px solid black; */
}

#theme:hover {
  background-color: var(--searchBgColor);
}

#createNew {
  width: 150px;
  background: linear-gradient(25deg, #5E2DE7 20%, #C981F9);
  border-radius: 15px;
  /* border: 2px solid #6279F0; */
  color: rgb(244, 244, 244);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0.5em;
  /* no space between */
  font-family: var(--fontStyle);
  font-size: 1.25rem;
  transition: 0.25s scale;
}


#createNew:hover {
    scale: 1.05;
    /* box-shadow: 2px 2px 5px var(--uploadBr); */
}

#profile {
  /* border: 1px solid black; */
  padding: 0.5em;
  border-radius: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: var(--fontStyle);
}

#profile p {
  font-size: 1rem;
}

#profile:hover {
  background-color: var(--searchBgColor);
}

/* Dashboard CSS */
#dashboardSection {
  height: calc(100% - 100px);
  display: flex;
  flex-direction: column;
  background-color: var(--emboseBgColor);
  /* gap: 20px; */
  border-radius: 15px;

}

#dashboardSection h1 {
  padding: 1em 1em 1em 1.5em;
  font-size: 2.5rem;
}

.welcome>div {
  width: 220px;
  height: 50px;
  gap: 20px;
  color: black;
  display: flex;
  /* justify-content: space-evenly; */
  align-items: center;
  padding: 1em;
  border-radius: 10px;
}

.welcome>div:nth-child(1) {
  background-color: #FCDFEB;
}

.welcome>div:nth-child(2) {
  background-color: #D9FFE8;
}

.welcome>div:nth-child(3) {
  background-color: #DADDFE;
}

.welcome>div:nth-child(4) {
  background-color: #fef7da;
}

.welcome>div:nth-child(3) img {
  width: 30px;
}

.welcome {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  /* padding: 0em 4em; */
  padding-left: 60px;
  gap: 1.5em;
  height: 100px;
  width: 100%;
  /* background-color:  var(--emboseBgColor);
  border-radius: 15px; */
}

/* Your works CSS */
#works {
  height: calc(100% - 140px);
  /* overflow: scroll; */
  padding: 1em;
  font-family: var(--fontStyle);

}

#works h2 {
  /* font-size: 2.5rem; */
  padding: 1em 1.5rem 0.5em 1.5em;
}

#works>div:nth-child(2) {
  width: 100%;
  height: calc(100% - 100px);
  padding: 10px 30px 30px 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 3em;
  row-gap: 3em;
  overflow: scroll;
  scroll-behavior: smooth;
}

.visuals .typeBox {
  position: absolute;
  padding: 0.5em;
  /* top: 10%; */
  bottom: 0;
  right: 4px;
  /* left: 19%; */
}

.visuals .typeBox>span {
  color: black;
  padding: 5px;
  border-radius: 50%;
  font-size: 2rem;
}

.visuals .code>span {

  background-color: #FBDADB;
  border: 2px solid #E78D5D;
}

.visuals .query {
  color: #D0AB27;
}

.visuals .code {
  color: #E78D5D;
}

.visuals .query>span {

  background-color: #FDF6D4;
  border: 2px solid #D0AB27;
}

.properties {
  position: relative;
  display: flex;
  background-color: var(--bgColor);
  height: 30%;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 10px;
}

.visuals {
  /* position: relative; */
  display: flex;
  flex-direction: column;
  justify-content: end;
  background: url("thumbNail.png");
  background-size: cover;
  border: 10px solid var(--bgColor);
  border-radius: 25px;
  overflow: hidden;

  height: 350px;
}



/* Projects CSS */
#projectSection {
  display: none;
  background-color: var(--emboseBgColor);
  width: 100%;
  flex-direction: column;
  height: calc(100vh - 132px);
  padding: 1em;
  border-radius: 1em;
  font-family: var(--fontStyle)
}

.all_projects {
  display: flex;
  gap: 1em;

}

.all {
  padding: 0.5em 1em;
  color: rgb(244, 244, 244);
  border-radius: 0.5em;
  border: 0px;
  cursor: pointer;
  background-color: #403548;

}

.onclick_btn {
  background-color: #5E2EE2;
}


#simple {
  width: 100%;
  height: auto;
  padding: 30px 30px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2em;
  row-gap: 4em;
  overflow: scroll;
  scroll-behavior: smooth;
}

/* Playground CSS */
#playgroundSection {
  display: none;
  width: 100%;
  /* margin-left: 252px; */
  /* margin-top: 1em; */
  background-color: var(--emboseBgColor);
  height: calc(100vh - 132px);
  padding: 1em;
  border-radius: 1em;
  font-family: var(--fontStyle);
  flex-direction: column;
}

#playgroundSection h1 {
  padding: 1em 0em 0em 1em;
  font-size: 2.5rem;
}

.vakata-context {
  z-index: 99999;
}


.playgroundInputs {
  display: flex;
  align-items: center;
  padding: 1em;
  /* background-color: var(--bgColor); */
}

.playgroundInputs div {
  padding: 1em;
}

.playgroundInputs span {
  font-size: 1.25rem;
}

.playgroundInputs input[type=text],
.playgroundInputs input[type=password] {
  padding: 0.75em 1em;
  border-radius: 0.5rem;
  border: 2px solid var(--text-dim);
  font-size: 1rem;
  background-color: var(--searchBgColor);
  color: var(--fontColor);
  outline: none;
}

.playgroundInputs input[type=text]:focus,
.playgroundInputs input[type=password]:focus {
  border: 1px solid #9C69F4;
}

.playgroundInputs input::placeholder {
  color: var(--text-dim);
}

.playgroundInputs button {
  padding: 0.5em 1em;
  font-size: 1.25rem;
  border-radius: 0.5em;
  width: 250px;
  border: 2px solid #019101;
  background-color: #00AB01;
  color: rgb(244, 244, 244);
  transition: 0.25s;
}

.playgroundInputs button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

.playgroundInputs button:hover {
  box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.5);
}

#container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-direction: column;
  height: calc(100% - 200px);
  /* margin: 1em 1em 1em 2em; */
  width: 100%;
  background-color: var(--bgColor);
  background-image: radial-gradient(#3f3f3f 2px, transparent 1px);
  background-size: 54px 54px;
  border-radius: 1em;
  position: relative;
}

#userIdError,
#pwdError,
#ipError {
  color: red;
}

.dropdown {
  /* display: none; */
  position: relative;
  /* padding: 1em; */
  width: 250px;
  font-size: 1rem;
  user-select: none;
  top: -10%;
  left: 40%;
}

.dropdown img {
  width: 32px;
}

/* Selected Box */
.dropdown-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8em 1em;
  border-radius: 8px;
  background: var(--bgColor);
  cursor: pointer;
  overflow: scroll;
  scrollbar-width: 2px;
  width: 100%;
  font-size: 1.25rem;
}

/* i.fi {
  font-size: 28px !important;
  color: #4CAF50 !important;
} */

/* Arrow */
.arrow {
  font-size: 2rem;
  transition: 0.3s ease;
  color: var(--uploadBg);
}

.dropdown.open .arrow {
  transform: rotate(180deg);
}

/* Menu */
.dropdown-menu {
  position: absolute;
  top: 110%;
  height: 0px;
  overflow: scroll;
  left: 0;
  width: 100%;
  background: var(--emboseBgColor);
  border-radius: 8px;
  /* padding: 0.5em 0; */
  margin: 1em 0;
  display: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.dropdown.open .dropdown-menu {
  display: block;
}

/* Items */
.dropdown-item {
  padding: 0.6em 1em;
  font-size: 1.25rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.dropdown-item:hover {
  background: var(--bgColor);
  color: rgb(244, 244, 244);
}

/* Active dot */
.dot {
  width: 8px;
  height: 8px;
  background-color: var(--uploadBg);
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

#dbs {
  /* display: none; */
  background-image: url("icons/database_available.png");
  background-repeat: no-repeat;
  background-position: 10px;
  width: 250px;
  position: relative;
  top: 100%;
  left: 250%;
  padding: 1em 2em 1em 2em;
  border-radius: 0.5em;
  background-color: var(--emboseBgColor);
  color: var(--text-dim);
  border: 0px;
  font-size: 1.25rem;
  overflow-y: auto;
}

/* 
#dbs:hover, #dbs:focus {
  background-color: var(--emboseBgColor);
  color: var(--text-dim);
} */

.db {
  display: flex;
  align-items: center;
  border-radius: 1em;
  border: 1px solid black;
  padding: 0.5em 1em;
  margin: 1em;
}

.db .dbIcon {
  font-size: 2.75rem;
}

.dbName {
  font-size: 1.5rem;
  padding: 0em 0.5em;
}


#erContainer {
  width: 1500px;
  height: 700px;
  flex: 1;
  overflow: auto;
  /* border: 1px solid #ccc;
    background: #f9f9f9; */
  padding: 20px
}

#erDiagramDiv {
  display: flex;
  justify-content: center;
  transform-origin: top left;

}

#erDiagramDiv svg .relationshipLine {
  stroke: #A98FE4 !important;
  stroke-width: 1.5px !important;
}

#erDiagramDiv svg marker path {
  stroke: #A98FE4 !important;
  stroke-width: 1.5px !important;
  /* fill: #4CAF50 !important; */
}

#erDiagramDiv svg .labelBkg {
  background-color: #cfbcfb !important;
}



#sqlBody {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-sidebar);
  display: flex;
}


#popUp {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;

}

#close-btn {
  color: var(--text-dim);
  padding: 0.25rem;
  position: absolute;
  right: 30px;
  top: 30px;
  font-size: 2rem;
  /* border: 4px solid tomato; */
  border-radius: 50%;

}

#close-btn:hover {
  background-color: var(--border-color);
}

#uploadWrapper {
  padding: 4rem;
  position: relative;
  width: 60%;
  /* border: 1px solid rgb(244, 244, 244); */
  height: 60%;
  background-color: #21222D;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-around;
}

#child-1 {
  width: 100%;
  display: flex;
  flex-direction: row;
  height: 80%;

}

#child-1>div,
#child-2>div {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}


#child-2 {
  width: 100%;
  display: none;
  flex-direction: row;
  height: 80%;
}



#addDropDown {
  width: 50%;
  height: 60px;
  margin: auto;
  /* text-align: center; */
  display: flex;
  justify-content: center;
  background-color: #24252E;
  color: rgb(244, 244, 244);
}

.addBtns {
  width: 50%;
  color: rgb(244, 244, 244);
  font-size: 2rem;
  outline: none;
  border: none;
  background-color: transparent;
  border-bottom: 5px solid #24252E;
}

#codeVisBtn {
  border-bottom: 5px solid #6279F0;
}


label[for="repoLink"]>span {
  font-size: 1.2em;
}

label[for="repoLink"] {
  width: 90%;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 2.5em;
  border: 1px solid var(--uploadBr);
  border-radius: 20px;
  padding: 20px;
}

#folder-label :nth-child(1) {
  font-size: 2rem;
  color: #6279F0;
}

#folder-label :nth-child(3) {
  color: rgb(100, 99, 99);
}

#folder-label :nth-child(2) {
  font-size: 1.8rem;
}

#folder-label {
  background-color: var(--uploadBg);
  width: 90%;
  aspect-ratio: 1.8;
  border-radius: 40px;
  border: 4px dashed #6279F0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#repoLink {
  width: 80%;
  border: none;
  outline: none;
  height: 100%;
  font-size: 1.2rem;
  background-color: transparent;
  color: rgb(244, 244, 244);
}

label[for="codeTitle"]>span,
label[for="SQLTitle"]>span {
  font-size: 1.8rem;
  /* color: var(--uploadBr); */
  padding-right: 1em;
  color: rgb(244, 244, 244);
}

#queryEditor {
  border-radius: 20px;
  font-size: 1.3rem;
  width: 90%;
  height: 90%;
  resize: none;
  outline: none;
  border: 3px solid #6279F0;
  background-color: var(--uploadbg);
  padding: 1rem;
  color: rgb(244, 244, 244);
}

label[for="codeTitle"],
label[for="SQLTitle"] {
  border-radius: 20px;
  height: 70px;
  display: flex;
  border: 1px solid var(--uploadBr);
  align-items: center;
  background-color: var(--uploadBg);
  justify-content: space-around;
  flex-direction: row;
  width: 90%;
  /* padding: 1em; */
}

#codeTitle,
#codeDesc,
#SQLDesc,
#SQLTitle {
  padding: 1em;
  border-radius: 20px;
  font-size: 1.5rem;
  color: rgb(244, 244, 244);
  resize: none;
  border: none;
  background-color: transparent;
  outline: none;
  width: 90%;
}

#codeTitle {
  width: 90%;
  height: 70px;
  /* padding-right: 1em; */
}


#codeDesc,
#SQLDesc {
  border: 1px solid var(--uploadBr);

  background-color: var(--uploadBg);
  height: 200px;
}

.save {
  border-radius: 10px;
  border: 4px solid #6279F0;
  width: 90%;
  height: 70px;
  color: rgb(244, 244, 244);
  font-size: 1.2rem;
  outline: none;
  background-color: #0D1127;
}


#sqlVisWrapper {
  flex: 1;
  overflow: auto;
  background: var(--bg-main);
}

#ERdiagram {
  width: 100%;
  height: 100%;
}

#codeBody {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-sidebar);
}

#tree {
  position: absolute;
  height: 100vh;
  overflow: auto;
  padding: 20px;
  background: #111;
  border-right: 1px solid var(--border-color);
  z-index: 1000;
  width: fit-content;
}

.google-icon::before {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  /* rgb(244, 244, 244)-space: nowrap; */
  direction: ltr;
  -webkit-font-smoothing: antialiased;

  width: 20px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Define the specific icons */
.icon-package::before {
  content: "folder";
  color: #f1e05a;
}

.icon-class::before {
  content: "code_blocks";
  color: #3b82f6;
}

.icon-methods::before {
  content: "function";
  color: #10b981;
}

.icon-fields::before {
  font-size: 28px;
  content: "stat_0";
  color: #a78bfa;
}

.icon-file::before {
  content: "description";
  color: #94a3b8;
}

.icon-standards::before {
  content: "rule";
  color: #f87171;
}

.jstree-default .jstree-hovered {
  background: rgba(255, 255, 255, 0.1) !important;
  border-radius: 4px;
  border: none !important;
  box-shadow: none !important;
  color: inherit !important;
}

.jstree-default .jstree-clicked {
  background: rgba(145, 35, 255, 0.2) !important;
  /* Subtle purple tint for selection */
  border: 1px solid #9123ff !important;
  border-radius: 4px;
  color: inherit !important;
}

#tree .jstree-anchor {
  color: #e6edf3 !important;
  transition: background 0.2s ease;
}

#changeView {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1001;
  display: flex;
  gap: 10px;
}

#changeView button {
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 6px;
  cursor: pointer;
}

#changeView button:hover {
  border-color: var(--accent-blue);
}

#visualizationMain {
  height: 100vh;
  width: 100%;
  background-color: var(--bgColor);
  background-image: radial-gradient(#3f3f3f 2px, transparent 1px);
}


#ownVis {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  /* display: flex; */
  background-color: var(--bgColor);
  background-image: radial-gradient(#3f3f3f 2px, transparent 1px);
  background-size: 54px 54px;
}

#mynetwork {
  height: 100%;
  background-color: var(--bgColor);
  background-image: radial-gradient(#3f3f3f 2px, transparent 1px);
  background-size: 54px 54px;
}

#diagram {
  /* cursor: move; user-select: none; touch-action: none; transform-origin: 50% 50%; transition: none; transform: scale(0.188876) translate(-19657px, -11665.7px); */
  width: 500%;
  height: 500vh;
  border: 10px solid rgb(244, 244, 244);
}

#mynetworkWrapper {
  position: relative;
  height: 100vh;
}

#mynetwork {
  height: 100%;
  background-color: var(--bgColor);
  background-image: radial-gradient(#3f3f3f 2px, transparent 1px);
  background-size: 54px 54px;

}

.toolTip {
  position: absolute;
  top: 20px;
  left: 300px;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1002;
}


/* Live DB CSS */
#liveDBSection {
  display: none;
  width: 100%;
  /* margin-left: 250px; */
  /* margin-top: 1em; */
  background-color: var(--emboseBgColor);
  height: 100%;
  padding: 1em;
  border-radius: 1em;
  font-family: var(--fontStyle);
}

#liveDBSection h1 {
  padding: 1em;
}

#liveDBSection .container {
  padding: 2em;
  height: 100%;
  width: 100%;
  border-radius: 1em;
  background-color: var(--bgColor);
  background-image: radial-gradient(#3f3f3f 2px, transparent 1px);
  background-size: 54px 54px;
  /* height: 100%; */
  display: flex;
  gap: 2em;
}

#liveDBSection .container textarea {
  /* padding: 2em; */
  border-radius: 1em;
  resize: none;
}



.CodeMirror {
  padding: 2em 1em 1em 1em;
  width: 600px;
  height: 700px;
  overflow: scroll;
  font-size: 0.95rem;
  border-radius: 1em;
}

#playgroundDiagram {
	width: 100%;
}
/* .CodeMirror-sizer {
    margin-left: 0 !important;
} */
/* ================================================================================================= */
/* loading for ai chat */
/* From Uiverse.io by anand_4957 */
.book,
.book__pg-shadow,
.book__pg {
  animation: cover 5s ease-in-out infinite;
}

.book {
  background-color: hsl(268, 90%, 65%);
  border-radius: 0.25em;
  box-shadow:
    0 0.25em 0.5em hsla(0, 0%, 0%, 0.3),
    0 0 0 0.25em hsl(278, 100%, 57%) inset;
  padding: 0.25em;
  perspective: 37.5em;
  position: relative;
  width: 8em;
  height: 6em;
  transform: translate3d(0, 0, 0);
  transform-style: preserve-3d;
}

.book__pg-shadow,
.book__pg {
  position: absolute;
  left: 0.25em;
  width: calc(50% - 0.25em);
}

.book__pg-shadow {
  animation-name: shadow;
  background-image: linear-gradient(-45deg,
      hsla(0, 0%, 0%, 0) 50%,
      hsla(0, 0%, 0%, 0.3) 50%);
  filter: blur(0.25em);
  top: calc(100% - 0.25em);
  height: 3.75em;
  transform: scaleY(0);
  transform-origin: 100% 0%;
}

.book__pg {
  animation-name: pg1;
  background-color: hsl(223, 10%, 100%);
  background-image: linear-gradient(90deg,
      hsla(223, 10%, 90%, 0) 87.5%,
      hsl(223, 10%, 90%));
  height: calc(100% - 0.5em);
  transform-origin: 100% 50%;
}

.book__pg--2,
.book__pg--3,
.book__pg--4 {
  background-image: repeating-linear-gradient(hsl(223, 10%, 10%) 0 0.125em,
      hsla(223, 10%, 10%, 0) 0.125em 0.5em),
    linear-gradient(90deg, hsla(223, 10%, 90%, 0) 87.5%, hsl(223, 10%, 90%));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 2.5em 4.125em, 100% 100%;
}

.book__pg--2 {
  animation-name: pg2;
}

.book__pg--3 {
  animation-name: pg3;
}

.book__pg--4 {
  animation-name: pg4;
}

.book__pg--5 {
  animation-name: pg5;
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(223, 10%, 30%);
    --fg: hsl(223, 10%, 90%);
  }
}

/* Animations */
@keyframes cover {

  from,
  5%,
  45%,
  55%,
  95%,
  to {
    animation-timing-function: ease-out;
    background-color: hsl(278, 84%, 67%);
  }

  10%,
  40%,
  60%,
  90% {
    animation-timing-function: ease-in;
    background-color: hsl(271, 90%, 45%);
  }
}

@keyframes shadow {

  from,
  10.01%,
  20.01%,
  30.01%,
  40.01% {
    animation-timing-function: ease-in;
    transform: translate3d(0, 0, 1px) scaleY(0) rotateY(0);
  }

  5%,
  15%,
  25%,
  35%,
  45%,
  55%,
  65%,
  75%,
  85%,
  95% {
    animation-timing-function: ease-out;
    transform: translate3d(0, 0, 1px) scaleY(0.2) rotateY(90deg);
  }

  10%,
  20%,
  30%,
  40%,
  50%,
  to {
    animation-timing-function: ease-out;
    transform: translate3d(0, 0, 1px) scaleY(0) rotateY(180deg);
  }

  50.01%,
  60.01%,
  70.01%,
  80.01%,
  90.01% {
    animation-timing-function: ease-in;
    transform: translate3d(0, 0, 1px) scaleY(0) rotateY(180deg);
  }

  60%,
  70%,
  80%,
  90%,
  to {
    animation-timing-function: ease-out;
    transform: translate3d(0, 0, 1px) scaleY(0) rotateY(0);
  }
}

@keyframes pg1 {

  from,
  to {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0.4deg);
  }

  10%,
  15% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(180deg);
  }

  20%,
  80% {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(180deg);
  }

  85%,
  90% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(180deg);
  }
}

@keyframes pg2 {

  from,
  to {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(0.3deg);
  }

  5%,
  10% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0.3deg);
  }

  20%,
  25% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(179.9deg);
  }

  30%,
  70% {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(179.9deg);
  }

  75%,
  80% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(179.9deg);
  }

  90%,
  95% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0.3deg);
  }
}

@keyframes pg3 {

  from,
  10%,
  90%,
  to {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(0.2deg);
  }

  15%,
  20% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0.2deg);
  }

  30%,
  35% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(179.8deg);
  }

  40%,
  60% {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(179.8deg);
  }

  65%,
  70% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(179.8deg);
  }

  80%,
  85% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0.2deg);
  }
}

@keyframes pg4 {

  from,
  20%,
  80%,
  to {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(0.1deg);
  }

  25%,
  30% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0.1deg);
  }

  40%,
  45% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(179.7deg);
  }

  50% {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(179.7deg);
  }

  55%,
  60% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(179.7deg);
  }

  70%,
  75% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0.1deg);
  }
}

@keyframes pg5 {

  from,
  30%,
  70%,
  to {
    animation-timing-function: ease-in;
    background-color: hsl(223, 10%, 45%);
    transform: translate3d(0, 0, 1px) rotateY(0);
  }

  35%,
  40% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0deg);
  }

  50% {
    animation-timing-function: ease-in-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(179.6deg);
  }

  60%,
  65% {
    animation-timing-function: ease-out;
    background-color: hsl(223, 10%, 100%);
    transform: translate3d(0, 0, 1px) rotateY(0);
  }
}