:root {
  --bgColor: rgba(244, 236, 247, 1.0); /* rgba(240, 255, 210, 1.0); */
  --bgDarker: rgba( 232, 218, 239, 1.0);
  --headerBgColor: rgba(244, 236, 247, 0.85);
  --textColor: rgba(0,0,0,0.86);
  --basePadding: 2em;
  --gap-distance: 0.65em;
  --border-color: grey;
  --border-radius: 6px;
}

*, *:after, *:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.unselectable {
  -moz-user-select: -moz-none;
  -khtml-user-select: none;
  -webkit-user-select: none;
  -o-user-select: none;
  user-select: none;
}

::-webkit-scrollbar {
  width: 0.65em;
  background-color: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.35);
  border: none;
  /* border-radius: 50%; */
}
::-webkit-scrollbar-track {
  box-shadow: none;
  background-color: transparent;
}


body {
  margin: 0px;
  padding: 0px;
  background-color: var(--bgColor);
  color: var(--textColor);
  font-family: sans-serif; /* 'VG5000'; */
  line-height: 1.35em;
}

.pageWrapper {
  display: block;
  position: relative;
  min-height: 100dvh;
}

header {
  width: 100%;
}


/* ******************************************************************************** */
/* text */

h1, h2, h3, h4, h5, h6 {
  font-family: sans-serif;
  line-height: 1.05em;
  font-weight: 400;
  margin: 0px 0px 1em 0px;
}
h2 {
  font-size: 2.5em;
}

p {
  margin: 0px 0px 1.5em 0px;
}
.center {
  text-align: center;
}

a {
  color: darkorchid;
}

/* ******************************************************************************** */
/* SAVE message */
#saveMessageWrapper {
  display: block;
  position: fixed; /* absolute; */
  top: 2em;
  left: 50%;
  transform: translate(-50%, 0px);
  z-index: 9000;
  background-color: white;
  padding: 0.5em 1em;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  opacity: 0;
  transition: all 500ms ease;
}

#saveMessageWrapper.shown {
  opacity: 1;
}


code {
  word-break: break-all;
}


/* ******************************************************************************** */
/* LOADER animation */

/* LOADER css - styling from codepen: https://codepen.io/Elbone/pen/sezjI */
/* Animation */
@-webkit-keyframes loading {
  to { -webkit-transform: rotate(360deg); }
}
@-moz-keyframes loading {
  to { -moz-transform: rotate(360deg); }
}
@-ms-keyframes loading {
  to { -ms-transform: rotate(360deg); }
}
@keyframes loading {
  to { transform: rotate(360deg); }
}    
.loading {
  display: block;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: transparent;
  margin-bottom: 0.35em;
  border-top: 3px solid rgba(0,0,0,0.75);
  border-right: 3px solid rgba(0,0,0,0.75);
  border-bottom: 3px solid rgba(0,0,0,0.25);
  border-left: 3px solid rgba(0,0,0,0.25);
  -webkit-animation: loading 1.2s infinite linear;
  -moz-animation: loading 1.2s infinite linear;
  -ms-animation: loading 1.2s infinite linear;
  animation: loading 1.2s infinite linear;
}


/* ******************************************************************************** */
/* PROMPT wrapper */

.promptWrapper {
  position: fixed;
  bottom: 0px;
  left: 0px;
  right: 0px;
  display: flex;
  height: 5em;
  justify-content: center;
  align-items: center;
  /* border: 1px solid red; */
}
.promptWrapper form {
  font-family: inherit;
  font-size: inherit;
  display: flex;
  flex-direction: row;
  /* box-shadow: 0px 5px 32px rgba(0,0,0,0.2); */
  max-width: 100%;
  border-radius: var(--border-radius);
  overflow: hidden;
}
/*
.promptWrapper input {
  font-family: inherit;
  font-size: inherit;
  padding: 0.5em 0.65em;
  border: 1px solid var(--border-color);
  border-right: 0px;
  border-radius: var(--border-radius) 0px 0px var(--border-radius);
  display: inline;
  min-width: auto;
  outline: 0;
  width: 100%;
}
input:focus {
  border: 2px solid blue;
  border-right: 0px;
  border-radius: var(--border-radius) 0px 0px var(--border-radius);
}
*/
.promptWrapper textarea {
  font-family: inherit;
  font-size: inherit;
  padding: 0.5em 0.65em;
  border: 1px solid var(--border-color);
  border-right: 0px;
  border-radius: var(--border-radius) 0px 0px var(--border-radius);
  outline: 0;
  width: 100%;
  line-height: inherit;
}
textarea:focus {
  border: 1px solid blue;
  border-right: 0px;
  border-radius: var(--border-radius) 0px 0px var(--border-radius);
}
.promptWrapper textarea::placeholder {
  font-style: italic;
}
.promptWrapper button {
  font-family: inherit;
  font-size: inherit;
  padding: 0.4em 0.75em; /* 0.375em 0.75em; */
  border: 1px solid var(--border-color);
  border-left: 0px;
  border-radius: 0px var(--border-radius) var(--border-radius) 0px;
  background-color: darkblue; /* darkgreen; */
  color: white;
  line-height: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
}
.promptWrapper button:hover {
  cursor: pointer;
}

.promptWrapper button svg {
  width: 21px;
  height: 21px;
  transform: rotate(-2deg);
}


.saveConversationWrapper {
  position: fixed;
  top: 0px;
  left: 50%;
  transform: translate(-50%, 0%);
  z-index: 9000;
}
.saveConversationWrapper button {
  font-family: inherit;
  font-size: inherit;
  padding: 0.4em 0.75em; /* 0.375em 0.75em; */
  border: 1px solid var(--border-color);
  border-top: 0px;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  background-color: darkblue; /* darkgreen; */
  color: white;
  line-height: inherit;
  display: flex;
  justify-content: center;
  align-items: center;
}
.saveConversationWrapper button:hover {
  cursor: pointer;
}


/* ******************************************************************************** */
/* CHAT RESPONSE wrappers */

main {
  padding: 0px; /* var(--basePadding); */
  display: block;
  max-width: 1400px; /* 1280px; */
  margin: 0px auto;
  min-height: 100dvh;
}
/* https://stackoverflow.com/questions/18614301/keep-overflow-div-scrolled-to-bottom-unless-user-scrolls-up */
/* THIS WORKS! */
.outer-container {
  overflow: auto;
  display: flex;
  flex-direction: column; /* column-reverse; */
  padding-top: var(--basePadding);
  padding-bottom: 5em; /* space for prompt bar */
  min-height: 100dvh;
  /* border: 1px solid green; */
  justify-content: flex-end; /*  now aligned to bottom */
}

main .turn {
  display: block;
  margin: 0px 0px var(--gap-distance) 0px;
}
main .turn:last-of-type {
  margin: 0px;
}
main .myTextWrapper {
  max-width: 85%; /* 82.5ch; */
  margin: 0px auto var(--gap-distance) auto;
}
main .myTextWrapper {
  background-color: white;
}
main .myTextWrapper .inside {
  max-width: 75ch;
  margin: 0px auto;
}
main .myTextWrapper p:last-of-type,
main .AITextWrapper p:last-of-type {
  margin: 0px;
}

/* this is the ROW with all AIs inside! */
main .AITextWrapper {
  display: flex;
  flex-direction: row;
  gap: 0px; /* var(--gap-distance); */
  min-width: 100%;
}
main .AITextWrapper > * {
  flex-grow: 1;
  flex-basis: 0; /* equal with for columns */
}
/* bubble */
main .bubble {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1em 1em 1em 1em;
  position: relative;
}
main .AITextWrapper .bubble {
  border: 0px;
  padding: 2.5em 1em 1em 1em; /* 1.5em 1em 1em 1em; */
  max-height: 80vh;
  overflow-y: scroll;
  overflow-x: hidden;
}
main .AITextWrapper .bubble::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.35);
  border: none;
  border-radius: 10px;
}

main .bubble .info {
  position: absolute;
  top: 0px;
  left: 50%;
  transform: translate(-50%, 0px);
  width: max-content;
  padding: 0.25em 0.35em; /* 0.2em 0.35em; */
  border: 1px solid rgba(0, 0, 0, 0.175);
  border-top: 0px;
  border-radius: 0px 0px var(--border-radius) var(--border-radius);
  font-family: monospace;
  font-size: 15px;
  line-height: 1.1em;
}
main .bubble .info a {  
  text-decoration: none;
}


/* ************************************************************** */
/* choose context wrapper */
.chooseContextWrapper {
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 9000;
  background-color: var(--bgColor);
  border-radius: 0px 0px var(--border-radius) 0px;
  border: 1px solid var(--border-color);
  border-top: 0px;
  border-left: 0px;
  padding: 0.375em 0.75em; /* 0.4em 0.75em; */
  font-family: inherit;
  font-size: inherit;
  line-height: inherit; /* 1.375em; */
}

#contextInfoWrapper {
  position: fixed;
  top: 0px;
  left: 0px;
  z-index: 8999;
  background-color: var(--bgColor);
  border-radius: 0px 0px var(--border-radius) 0px;
  border: 1px solid var(--border-color);
  border-top: 0px;
  border-left: 0px;
  padding: 3.5em 1.5em 1.5em 1.5em; /* 0.375em 0.75em; /* 0.4em 0.75em; */
  font-family: inherit;
  font-size: 13px; /* 0.9em; */
  line-height: 1.3125em; /* 1.375em; */ 
  max-width: 40ch;
  /* transform: translate(0%, -100%); */
  opacity: 0.0;
  transition: all 250ms ease;
}
#contextInfoWrapper.shown {
  /* transform: translate(0, 0); */
  opacity: 1.0;
}
#contextInfoWrapper p {
  margin-bottom: 0px;
}


.chatColumn {
  background-color: lightcyan;
}
/* AIs specifically */
.Gemini {
  background-color: rgba(255,0,255,0.2); /* pink; */
}
.ChatGPT {
  background-color: antiquewhite;
}
.Claude {
  background-color: antiquewhite;
}
.Llama {
  background-color: azure;
}
.Mistral {
  background-color: rgba(32, 178, 170, 0.375); /* lightskyblue; */
}
.DeepSeek {
  background-color: rgba(144,238,144,0.65);
}


/* ******************************************************************************** */
/* ******************************************************************************** */
/* MEDIA queries */

@media screen {

  :root {
    --basePadding: 1em;  
  }

  body {
    font-size: 15px;
  }

}


/* ******************************************************************************** */
@media screen and (min-width: 600px) {

  :root {
    --basePadding: 2em;  
  }

  body {
    font-size: 16px;
  }

  .promptWrapper textarea {
    min-width: 80vw;
  }

}


/* ******************************************************************************** */
@media screen and (min-width: 1024px) {

  :root {
    --basePadding: 2.5em;  
  }

  body {
    font-size: 16px;
  }

  .promptWrapper textarea {
    min-width: 60vw;
  }

}



/* ******************************************************************************** */
/* ******************************************************************************** */
/* ******************************************************************************** */
/* ******************************************************************************** */

/*
@font-face {
  font-family: 'VG5000';
  src:    url('../fonts/VG5000-Regular_web.eot');
  src:    url('../fonts/VG5000-Regular_web.eot?#iefix') format('embedded-opentype'),
          url('../fonts/VG5000-Regular_web.woff') format('woff'),
          url('../fonts/VG5000-Regular_web.woff2') format('woff2'),
          url('../fonts/VG5000-Regular_web.ttf') format('truetype'),
          url('../fonts/VG5000-Regular_web.svg#svgFontName') format('svg');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'karrikregular';
  src: url('../fonts/Karrik-Regular.woff2') format('woff2'),
       url('../fonts/Karrik-Regular.woff') format('woff'),
       url('../fonts/Karrik-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: normal;       
}
@font-face {
  font-family: 'karrikitalic';
  src: url('../fonts/karrik-italic-webfont.woff2') format('woff2'),
       url('../fonts/karrik-italic-webfont.woff') format('woff'),
       url('../fonts/karrik-italic-webfont.ttf') format('woff');
  font-weight: normal;
  font-style: normal;
}
*/