@import url("https://fonts.googleapis.com/css2?family=Poppins&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}

main {
  min-height: 100vh;
  background: linear-gradient(to right top, #55f3fa, #8061fa) !important;
  display: flex;
  justify-content: center;
  align-items: center;
}

.glass {
  background: white !important;
  min-height: 80vh;
  width: 90%;
  background: linear-gradient(
    to right bottom,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.25)
  ) !important;
  border-radius: 2rem;
  z-index: 20;
  backdrop-filter: blur(2rem);
  display: flex;
  animation: transitionIn 1s;
}

.dashboard-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dashboard {
  height: 70vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    to right bottom,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.2)
  ) !important;
}

.topics-button {
  display: flex;
  justify-content: center;
  width: 60%;
  height: fit-content;
}

#homepg-topic-btn{
  border-radius: 15px;
  font-size: 16px;
  background-color: #178aadfa;
  color: white;
  font-weight: 500;
  font-family: Poppins;
  border-style: hidden;
  padding: 13px;
}

#homepg-topic-btn:hover {
  background-color:#60c2df;
  transition: 0.5s;
  padding: 17px!important;
}

.topics-btn-container {
  display: flex;
  width: 100%;
  justify-content: center;
  height: 100px;
  flex-direction: column;
  align-items: center;
  background: linear-gradient( to right bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2) ) !important;
}

.bot {
  height: 130px!important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.bot img {
  animation: bot_rotate 1s ease-out;
}

.bot h3 {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: 23px;
  margin: 20px;
}

.chat-section {
  height: 80vh;
  width: 70%;
  border-radius: 0 2rem 2rem 0;
}
.chat-view {
  padding: 1rem;
  max-height: 85%;
  margin-top: 20px;
  overflow-y: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: auto;
}

.chat-view::-webkit-scrollbar {
    width: 5px!important;
}

.chat-view::-webkit-scrollbar-track {
  background: #178aad2b!important;        /* color of the tracking area */
}

.chat-view::-webkit-scrollbar-thumb {
    background: #178aadfa!important;
    border-radius: 40px!important;
}

.chat-view {
  scrollbar-width: thin;
  scrollbar-color: #178aadfa #178aad2b;
}

.bot-container,
.user-container {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  animation: fadeIn 0.5s ease-in-out;
  margin-bottom: 15px;
}

.bot-msg {
  float: left;
  background-color: #178aadfa;
  color: #fff;
  border-radius: 0px 20px 20px 20px;
  padding: 15px;
  width: 40%;
  text-align: left;
}

.user-msg {
  float: right;
  height: 100%;
  width: auto;
  background-color: rgb(86, 79, 255);
  color: white;
  border-radius: 20px 0px 20px 20px;
  padding: 15px;
  width: 40%;
  text-align: left;
}

.type-section {
  position: absolute;
  bottom: 2%;
  width: 70%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.type-section input{
  border: none;
  outline: none;
  width: 100%;
  margin: 0 30px;
  height: 2.2rem;
  border-radius: 5rem;
  background: linear-gradient(
    to right bottom,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.5)
  ) !important;
  padding: 0 20px;
}

.type-section input::placeholder {
    font-size: 17px!important;
}

input[type="text"] {
    font-size: 12px;
}

input[type="text"]:focus {
    outline: none !important;
    border:1.5px solid #178aadfa;
  }

.type-section button {
  padding: 11px 9px;
  margin-left: 2px;
  font-size: 13px;
  border-radius: 7px;
}

@keyframes transitionIn {
  from {
    opacity: 0;
    transform: rotateX(-10deg);
  }
  to {
    opacity: 1;
    transform: rotateX(0);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0.3;
    transform: rotate(0deg);
  }
  to {
    opacity: 1;
    transform: rotate(720deg);
  }
}

@keyframes bot_rotate {
  from {
    opacity: 0;
    transform: rotate(0);
  }
  to {
    opacity: 1;
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


/* scroll down  button */
.scroll-me {
  display: none;
  width: 50px;
  height: 100px;
  position: absolute;
  top: 75%;
  left: 95%;

  background-image: url(../img/scroll-arrow.png);
  background-repeat: no-repeat;
  background-position: 50% 50%;
  height: 70px;

  /* this is to change the blue color of the scroll down button, into a green shade */
  filter: invert(72%) sepia(66%) saturate(1754%) hue-rotate(163deg) brightness(87%) contrast(102%);

}

#scroll-button{
    display:none;
}


#send_btn{
    background-image: url(../img/send-btn.png);
    background-repeat: no-repeat;
    background-position: 50% 50%;
    height: 50px;
    width: 50px;
    border: none;
    background-color: transparent;
}

#send_btn span {
  display: none;
}

#send_btn:hover {
  background-color:#60c2df;
  transition: 0.2s;
  padding: 27px!important;
}



/* ----------------------------------------------- */
/* Base styles (phones down to 0px) */

.chat-section{
  width: 80%;
}
.input-field {
  font-size: 0.9rem;
  padding: 0.5rem;
}
.input-field::placeholder {
  font-size: 9px;
}

.bot, .dashboard, .button-group, .bot-msg, .user-msg {
  transition: all 0.3s ease;
}

.dashboard{
  width: 100px;
}

.bot{
  height: 100px;
}

.bot-msg{
  width: 90%;
  font-size: 10px;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.user-msg{
  width: 90%;
  font-size: 10px;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.bot img {
  width: 60px;
  height: 60px;
}
.bot h3 {
  font-size: 12px;
  text-align: center;
}

.flag-icon {
  max-width: 100%;
  max-height: 100%;

}

.language-btn {
  width: 35px!important;
  height: 35px!important;
  padding: 0;
}

.button-group {
  max-width: 55%;
}

#toggle-info-btn-technical, #toggle-info-btn-methodology {
  font-size: 8px;
  padding: 0.4rem 0.8rem;
  margin:0px;
}

#info-message-technical, #info-message-methodology {
  display: none; /* toggled by JS */
  font-size: 7px;
  margin-top: 10px;
  overflow: auto;

  /* Scrollbar styling for Firefox */
  scrollbar-width: thin;
  scrollbar-color: #178aadfa #178aad2b;
}

/* Scrollbar styling for WebKit browsers (Chrome, Safari, Edge) */
#info-message-technical::-webkit-scrollbar, #info-message-methodology::-webkit-scrollbar{
  width: 6px;
}

#info-message-technical::-webkit-scrollbar-track, #info-message-methodology::-webkit-scrollbar-track{
  background: #178aad2b;
}

#info-message-technical::-webkit-scrollbar-thumb, #info-message-methodology::-webkit-scrollbar-thumb{
  background-color: #178aadfa;
  border-radius: 10px;
}

.type-section{
  width: 65%;
}

.type-section input{
  padding: 0 10px;
  margin: 0px!important;
}

.type-section input::placeholder {
    font-size: 9px!important;
}

#explanations-btn-persona, #explanations-btn-moral{
  padding: 10px 9px;
  font-size: 8px;
  margin-top: 20px;
}


#feedback-yes{
  font-size: 9px;
}

#feedback-no{
  font-size: 9px;
}



.loader-icon {
  border: 10px solid #f3f3f3;
  border-top: 10px solid #178aadfa;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 2s linear infinite;
  margin: 30px auto;
  position: relative;
}

.loader-icon.done {
  animation: none;
  border: 10px solid #178aadfa;
  background-color: #178aad0a;
}

.loader-icon.done::after {
  content: '✔';
  font-size: 30px;
  color: #178aad;
  position: absolute;
  top: 0px;
  left: 10px;
}


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


#restartButton{
  padding: 10px 9px;
  font-size: 8px;
  margin-top: 20px;
}



/* ----------------------------------------------- */
/* Landscape tablets (768px – 991px) */
@media (min-width: 540px) {

.dashboard {
  width: 150px;
}

.language-btn {
  width: 45px !important;
  height: 45px !important;
 
}

#toggle-info-btn-technical, #toggle-info-btn-methodology{
  font-size: 10px;
}

#info-message-technical, #info-message-methodology{
  font-size: 9px;
}

#explanations-btn-persona, #explanations-btn-moral{
  font-size: 9px;
}

.loader-icon.done::after {
  top: -1px;
  left: 9px;
}

}


#restartButton{
  font-size: 9px;
}



/* Landscape tablets (768px – 991px) */
@media (min-width: 768px) {

.dashboard {
  width: 200px;
}

.bot-msg{
  width: 70%;
  font-size: 12px;
}

.user-msg{
  width: 70%;
  font-size: 12px;
}

.language-btn {
  width: 45px !important;
  height: 45px !important;
 
}

.bot img {
  width: 70px;
  height: 70px;
}


.bot h3{
  font-size: 13px;
  margin: 15px;
}

.button-group{
  max-width: 90%;
}

#toggle-info-btn-technical, #toggle-info-btn-methodology{
  font-size: 12px;
}

#info-message-technical, #info-message-methodology{
  font-size: 10px;
}

.type-section {
  width: 70%;
}

.type-section input{
  margin: 15px !important;
}

.type-section input::placeholder {
    font-size: 13px!important;
}

#explanations-btn-persona, #explanations-btn-moral{
  font-size: 11px;
}


#btn-yes-persona, #btn-no-persona, #btn-yes-moral, #btn-no-moral {
  font-size: 10px;
}


.loader-icon {
  border: 12px solid #f3f3f3; /* Light grey */
  border-top: 12px solid #178aadfa; /* Blue */
  width: 80px;
  height: 80px;
}

.loader-icon.done::after {
  font-size: 50px;
  top: -5px;
  left: 10px;
}


#restartButton{
  font-size: 11px;
}


}


/* ----------------------------------------------- */
/* Desktops (992px – 1279px) */
@media (min-width: 992px) {


.language-btn {
  width: 50px !important;
  height: 50px !important;
 
}

.bot{
  height: 160px !important;
  margin-top: 35px;
}

.bot img {
  width: 80px;
  height: 80px;
}


.bot h3{
  font-size: 15px;
  margin: 14px;
}

#toggle-info-btn-technical, #toggle-info-btn-methodology{
  font-size: 13px;
}

#info-message-technical, #info-message-methodology{
  font-size: 11px;
}

.type-section{
  width: 70%;
}

.type-section input{
  margin: 20px !important;
}

.input-field {
  font-size: 16px;
  padding: 40px;
}
.input-field::placeholder {
  font-size: 16px;
}

.type-section input::placeholder {
    font-size: 16px!important;
}

input[type="text"] {
    font-size: 16px;
}

#toggle-info-btn-technical, #toggle-info-btn-methodology {
  padding: 0.6rem 0.8rem;
  margin: 5px;
}
  
}


/* ----------------------------------------------- */
/* Large desktops (1280px and up) */
@media (min-width: 1280px) {

.dashboard {
  width: 250px;
}

.bot-msg{
  width: 40%;
  font-size: 13px;
}

.user-msg{
  width: 40%;
  font-size: 13px;
}


.bot h3{
  font-size: 14px;
}

#info-message-technical, #info-message-methodology{
  font-size: 12px;
}

.type-section {
  width: 70%;
}

.type-section input {
  padding: 20px 10px;
}

.chat-section {
  width: 75%;
}

#explanations-btn-persona, #explanations-btn-moral{
  font-size: 13px;
}

 
#btn-yes-persona, #btn-no-persona, #btn-yes-moral, #btn-no-moral {
  font-size: 11px;
}


.loader-icon {
  border: 15px solid #f3f3f3; /* Light grey */
  border-top: 15px solid #178aadfa; /* Blue */
  width: 90px;
  height: 90px;
}

.loader-icon.done::after {
  font-size: 60px;
  top: -7px;
  left: 12px;
}


#restartButton{
  font-size: 13px;
}



}


/* ----------------------------------------------- */
/* Extremely Large desktops (1280px and up) */
@media (min-width: 1440px) {

.bot-msg{
  width: 50%;
  font-size: 14px;
}

.user-msg{
  width: 50%;
  font-size: 14px;
}


.bot h3{
  font-size: 15px;
}

#info-message-technical, #info-message-methodology{
  font-size: 13px;
}

  
}


.language-btn {
  margin: 5px;
  padding: 5px;
  cursor: pointer;
  border: 1px solid #178aadfa;
  border-radius: 5px;
  background-color: #4eadd0;
  display: inline-block;  /* Keep the flags inline */
  width: 70px; /* Adjust size of buttons */
  height: 60px;
  text-align: center;  /* Center the image in the button */
}

.language-btn:disabled {
  cursor: not-allowed;
}

/* Ensure the flag icons are appropriately sized */
.flag-icon {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}


.button-group{
  text-align: center;

  display: flex;
  flex-direction: column;
  max-width: 70%;
}

.info-toggle-button {
  background-color: #178aadfa;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  margin-top: 10px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: background-color 0.3s ease;
}

.info-toggle-button:hover {
  background-color: #60c2df;
}      


.info-toggle-button-explainaibility {
  background-color: rgb(244, 244, 236);
  color: black;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  margin-top: 10px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: background-color 0.3s ease;
}

.info-toggle-button-explainaibility:hover {
  background-color: #60c2df;
}


.info-toggle-button-feedback {
  background-color: white;
  color: #178aadfa;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 14px;
  margin-top: 10px;
  cursor: pointer;
  font-family: "Poppins", sans-serif;
  transition: background-color 0.3s ease;
}

.info-toggle-button-feedback:hover {
  background-color: #60c2df;
  color: white;
}


/* Additional styling specifically for the explanation button */
.explanations-btn-persona, .explanations-btn-moral {
  padding: 20px 15px; /* Bigger padding for prominence */
  font-size: 15px;     /* Slightly larger text */
  margin-top: 30px;    /* More spacing from the first button */
  white-space: normal; 
  word-wrap: break-word;
}

.button-disabled {
  background-color: #b0c4cd; /* Muted blue-grey */
  color: #ffffff;
  cursor: not-allowed;
  opacity: 0.6;
}



