/*  ki-homepage Chatbot CSS 
    ak 2024      */



/* Settings */

:root {
  --col-bubble-ai: #f1f1f1;
  --col-bubble-user: #006E71;
  --col-dialog-bg: #153e5f;
  --col-form-elements: #006E71;
  --col-form-elements-hover: #00857F;
  /* --col-bubble-user: #007bff;
  --col-form-elements: #007bff;
  --col-form-elements-hover: #009bff; */
  --font-color: #FFFFFF;
  --font-size: 18px;
  --width-chatbot: 980px;
}

/* Settings end. */


/* Common Elements */

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background-color: transparent;
  font-size: var(--font-size);
}

body {
  background-color: transparent;
  color: var(--font-color);
  font-family: 'Roboto', Verdana, Geneva, Tahoma, sans-serif;
  font-size: var(--font-size);
  height: 100%;
  line-height: 1.5rem;
  width: 100%;
  margin: auto;
  overflow: hidden;
  padding: 0;
  position: relative;
  z-index: 1;
}

a {
  color: #4b8cff;
}
a:visited {
  color: #4b8cff;
}


button:is([type="submit"]) {
  /* background-image: url('{{ url_for('static', filename='pfeil.svg') }}'); */
  background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2232%22%20height%3D%2232%22%20fill%3D%22none%22%20viewBox%3D%220%200%2032%2032%22%20class%3D%22icon-2xl%22%3E%3Cpath%20fill%3D%22white%22%20fill-rule%3D%22evenodd%22%20d%3D%22M15.192%208.906a1.143%201.143%200%200%201%201.616%200l5.143%205.143a1.143%201.143%200%200%201-1.616%201.616l-3.192-3.192v9.813a1.143%201.143%200%200%201-2.286%200v-9.813l-3.192%203.192a1.143%201.143%200%201%201-1.616-1.616z%22%20clip-rule%3D%22evenodd%22/%3E%3C/svg%3E');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
button:active {
  filter: brightness(1.2);
  transform: translateY(4px);
}


h1 {
  font-size: 2rem;
  font-weight: bold;
  line-height: 2rem;
}
h2 {
  font-size: 1.5rem;
  font-weight: normal;
  line-height: 1.5rem;
  margin-top: 2rem;
}

hr {
  margin-top: 2rem;
  margin-bottom: 2rem;
  border: none;
  height: 1px;
  background-color: var(--font-color);
}

img {
  max-width: 100%;
}

input, textarea {
  color: white;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  flex-grow: 1;
  padding: 0.7rem;
  border: 2px solid white;
  border-radius: 0.4rem;
  margin-right: 0.7rem;
}
input:focus, textarea:focus {
  /* border-color: var(--col-form-elements); */
  outline: 1px solid var(--col-form-elements);
}

input:is([type="checkbox"], [type="radio"]) {
  margin-right: 0.7rem;
  width: unset !important;
  height: 1rem;

}

input:is([type="reset"], [type="button"], [type="submit"]), button {
  background-color: var(--col-form-elements);
  border: none;
  border-radius: 0.4rem;
  color: white;
  cursor: pointer;
  flex-grow: 0;
  font-size: 1rem;
  margin-right: 0;
  min-width: 80px;
  padding: 0.7rem 1.5rem;
  transition: all 0.5s ease-in-out 0s;
}
input:is([type="reset"], [type="button"], [type="submit"]):hover, button:hover {
  background-color: var(--col-form-elements-hover);
}
input::placeholder {
  color: white; 
  opacity: 1;
}

video {
  width: 100%;
}



/* Scrollbar 
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}
*/


* {
  scrollbar-width: thin;
  scrollbar-color: var(--col-form-elements) transparent;
}


/* Page Elements */

@keyframes blink {
  0%   { transform: translateY(0px); filter: brightness(1); }
  50%  { transform: translateY(4px); filter: brightness(1.2); }
  100% { transform: translateY(0px); filter: brightness(1); }
}
.blink {
  animation: blink 0.4s linear;
}


.cursorHand {
  cursor: pointer;
}


.div_BottomLine {
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 1rem;
  padding-left: 5px;
  padding-right: 5px;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
}

.div_Caution {
  font-size: 0.6rem;
  padding-top: 0.5rem;
  text-align: center;
}				 

.div_Centered {
  font-weight: bold;
  line-height: 2rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  width: 100%;
}


.div_Chatbot {
  background: transparent;
  border-radius: 0.7rem;
  overflow: hidden; /* to avoid border-radius being overwritten by child elements */
  /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
  display: flex;
  flex-direction: column;
  height: calc(100vh - 1rem);
  margin: 1rem auto;
  margin-bottom: 0;
  max-width: var(--width-chatbot);
  position: relative;
  width: 100%;
}


.div_Contact {
  border: 1px solid white;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
}

.div_ContactForm {
  background: var(--col-dialog-bg);
  border: 1px solid white;
  border-radius: 0.5rem;
  opacity: 0.95;
  overflow-y: auto;				 
  padding: 1rem;
  width: calc(var(--width-chatbot) - 20%);
  max-width: 100%;
}
.div_ContactForm h2 {
  margin-top: 0rem;
}
.div_ContactForm input, .div_ContactForm textarea {
  border: 1px solid white;
  margin-bottom: 0.5rem;
  width: 100%;
}


.div_Dialog {
  background-color: var(--col-dialog-bg);
  border-radius: 0.4rem;
  display: flex; 
  flex-direction: column; 
  font-size: 0.8rem;
  height: 100%;
  max-height: 80%;
  opacity: 0.95;
  padding: 1rem;
  width: 80%;
}
.div_Dialog h1 {
  font-size: 1.5rem;
  font-weight: normal;
  line-height: 1.5rem;
  margin-top: 0rem;
}
.div_Dialog h2 {
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.5rem;
  margin-top: 0rem;
}

.div_Dialog_Footer {
  text-align: center;
}
.div_Dialog_Text{
  flex: 1;
  overflow-y: auto;
  margin-bottom: 1rem;
}


.div_Error {
  /* display: none; */
  background: #f8d7da;
  border-radius: 0.5rem;
  color: #721c24;
  margin-bottom: 1rem;
  padding: 1rem;
}


.div_Example {
  color: #4b8cff;
  cursor: pointer;
  margin-bottom: 1rem;
  margin-left: 3rem;
  position: relative;
  padding-left: 1.5rem; 
  transition: all 0.5s ease-in-out 0s;
}
.div_Example:hover {
  color: #8080ff;
}

.div_Example::before {
  content: '•'; /* Unicode character for bullet point */
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: #4b8cff;
}


.div_Footer {						  
  margin: auto;
  /* margin-top: 0.5rem;
  padding: 1.5rem;
  padding-bottom: 1.7rem; */
  padding-bottom: 0.5rem;
  padding-top: 1rem;
  position: relative;
  width: 65%;
  /* border-top: 1px solid #e0e0e0; */
}
.div_Footer form {
  display: flex;
  width: 100%;
}


.div_Header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  color: white;
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.div_Header img {
  height: 80px;
  margin-right: 1rem;
}

.div_Header_Icons img {
  height: 30px;
  margin-left: 1rem;
  margin-right: 0;
}


.div_Menu {
  /*position: absolute;
  bottom: 0px;
  left: 2.3rem;*/
  font-size: 0.6rem;
}
.div_Menu a {
  color: white;
  text-decoration: none;
}


.div_Messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}


.div_Overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
}


.div_PoweredBy {
/*  position: absolute;
  bottom: -5px;
  left: 0;
  left: calc(50% - 41px);*/
  color: #81838d;
  font-size: 0.7rem;
  /* text-align: center;
  width: 100%; */
}
.div_PoweredBy a {
  text-decoration: none;
  color: #007bff;
  /* color: var(--col-form-elements); */
}
.div_PoweredBy a:hover {
  color: #009bff;
}
.div_PoweredBy img {
  width: 82px
}


.div_SpeechBubble {
  background: transparent;
  border-radius: 1rem;
  display: inline-block;
  margin-bottom: 1rem;
  max-width: 100%;
  padding: 10px 15px;
  position: relative;
  text-align: left;
}

.div_SpeechBubble img, .div_SpeechBubble video, .div_SpeechBubble iframe {
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}
/* x .div_SpeechBubble > p img:first-of-type {
  border-radius: 0;
  width: 100%;
} */


.div_Teaser {
  margin-bottom: 2rem;
  /* margin-top: 2rem; */
  text-align: left;
}
.div_Teaser h1 {
  font-size: 2.5rem;
  font-weight: bold;
  line-height: 2.5rem;
  /* margin: 0; */
}

.div_VideoBg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.div_VideoBg video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: -1;
}
.div_VideoBg_orig video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -1;
}



.hidden {
  display: none;
}



/* Bot Elements */

.message-user {
  background-color: var(--col-bubble-user);
  border-radius: 0.4rem;
  color: #fff;
  margin-left: 0;
  margin-right: auto;
  margin-bottom: 0;
  padding: 0.5rem;
}
.message-user ul {
  margin-block-start: 0;
  margin-block-end: 0;
  padding-inline-start: 1rem;
}

.message-bot li {
  margin-bottom: 1rem;
}

._message-bot > p {
  margin-top: 2rem;
}


.nobr {
  white-space: nowrap;
}



/* "busy" spinner */

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--col-form-elements);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* Responsiveness / Mobile */

@media (max-width: 600px) {

  :root {
    --font-size: 14px;
  }

  body {
    height: 100%;
  }

  .div_Caution {
    /* font-size: 0.8rem; */
    padding-top: 0.1rem;
  }

  .div_Chatbot {
    border-radius: 0;
    height: 100%;
    margin: 0;
    /* max-width: none; */
  }

  .div_Dialog {
    width: calc(100% - 3rem);
  }

  .div_Example {
    margin-left: 0rem;
  }

  .div_Footer {
    padding: 1.5rem;
    padding-top: 0.5rem;
    width: 100%;
  }

  .div_Header {
    padding-left: 0;
    padding-right: 0;
  }
  .div_Header img {
    height: 65px;
    margin: 0;
    padding: 0;
  }
  
  .div_Header_Icons {
    position: absolute;
    top: 10px;
    right: 10px;
    width: calc(100% - 180px);
    text-align: right;
  }
  .div_Header_Icons img {
    height: 20px;
    margin-left: 1rem !important;
  }

  .div_Menu {
    font-size: 0.8rem;
    left: 1rem;
  }

  .div_PoweredBy {
    left: unset;
    right: 1rem;
  }

  .div_SpeechBubble {
    max-width: 100%;
  }
}