/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* font-family: 'Roboto Flex', sans-serif; */
  font-family: 'Comic Mono', sans-serif;
  /* Margin bottom by footer height */
  margin-bottom: 60px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  /* Set the fixed height of the footer here */
  height: 60px;
  line-height: 60px;
  /* Vertically center the text there */
  background-color: #f5f5f5;
}


/* Custom page CSS
  -------------------------------------------------- */
/* Not required for template or sticky footer method. */

body>.container {
  padding: 60px 15px 0;
  margin-top: 1em;
}

.footer>.container {
  padding-right: 15px;
  padding-left: 15px;
}

code {
  font-size: 80%;
}

.navbar {
  background-color: #514a95;
}

h1 {
  color: #b91a8f;
}

.btn-primary {
  border-color: #514a95;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open>.dropdown-toggle.btn-primary {
  color: #fff;
  background-color: #514a95;
  border-color: #b91a8f;
}

.badge-primary,
.bg-primary,
.card-primary,
.dropdown-toggle-split-primary,
.table-primary,
.alert-primary,
.bg-primary,
.btn-primary,
.list-group-item-primary {
  background-color: #b91a8f;
}

.border-primary,
.btn-outline.primary {
  border-color: #514a95;
}

.text-primary {
  color: #b91a8f;
}

.loader {
  position: fixed;
  left: 50%;
  border: 16px solid #514a95;
  border-top: 16px solid #b91a8f;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  animation: spin 2s linear infinite;
}

/* Overlay */
#overlay {
  position: fixed;
  top: 56px;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: #514a95;
  opacity: 1;
  z-index: 9999999;
}

/* Rainbow */
.rainbow-text {
  background-image: linear-gradient(to left, violet, indigo, blue, green, yellow, orange, red);
  clip: text;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}


.image-container {
  width: 200px;
  height: 250px;
}

.icon-container {
  width: 50px;
  height: 50px;
}


@font-face {
  font-family: Comic Mono;
  font-weight: normal;
  src: url(/static/fonts/ComicMono.ttf);
}

@font-face {
  font-family: Comic Mono;
  font-weight: bold;
  src: url(/static/fonts/ComicMono-Bold.ttf);
}


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

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}
/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}


/** CHAT WIDGET **/

.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

#chat-toggle {
  background-color: #514a95;
  color: white;
  border: none;
  padding: 15px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.chat-container {
  display: none;
  flex-direction: column;
  width: 500px;
  height: 60vh; /* 60% of the viewport height */
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  overflow-y: scroll;
  overflow-x: hidden;
}

.chat-header {
  background-color: #514a95;
  color: white;
  padding: 15px;
  text-align: center;
}

.chat-log {
  flex-grow: 1;
  padding: 10px;
  overflow-y: auto;
}

.chat-message {
  margin-bottom: 10px;
}

.user-message {
  text-align: right;
  background-color: #514a95;
  opacity: 0.7;
  color: white;
  border-radius: 5px;
  border: solid white;
}

.bot-message {
  text-align: left;
}

.bot-title {
  text-align: left;
  font-size: x-small;
  text-decoration: italic;
}

.chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.thinking-message::after {
  display: inline-block;
  animation: ellipsis 1s infinite;
  content: ".";
  width: 1em; /* Provides space for three dots to prevent layout shifting */
  text-align: left;
}

@keyframes ellipsis {
  0% {
    content: "";
  }
  33% {
    content: ".";
  }
  66% {
    content: "..";
  }
  100% {
    content: "...";
  }
}

#user-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 10px;
}

#send-btn {
  background-color: #514a95;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  margin-left: 10px;
  cursor: pointer;
}