/*Importing Google Fonts*/
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');


/***************************************************************/
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  gap: 0px;              /* space between elements */
}

.progress-bar .step {
  width: 140px;
  height: 70px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid #c5c1c2;  /* pink border */
  color: #c5c1c2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.progress-bar .enlarged {
  transform: scale(1.2);
  border: 3px solid black;
}


.progress-bar .line {
  height: 5px;
  width: 50px;
  background-color: #c5c1c2;
}

.progress-bar .filled {
 background-color: white;
  color: black;
  border: 2px solid black;
  background: var(--secondary-color); 
}

/***************************************************************/
.initial-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  
  background-color: #f8f8f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999; /* on top of chat */
}

.initial-screen .header {
  margin-top: -5vh; /* shift upward */
}

.initial-screen .drop-zone {
  height: 25vh;        /* enough to be visible but not overpowering */
  width: 70%;
  padding: 3rem;
  font-size: 1.2rem;
  margin-top: 0rem;  /* small gap below header */
}

/* Make the upload (drop-zone) larger */
.initial-screen .drop-zone {
  width: 70%;          /* increase width */
  padding: 5rem;       /* increase overall size */
  font-size: 1.2rem;   /* enlarge text inside */
}

/* Optional: slightly reduce vertical spacing between title and box */
.initial-screen .header .subtitle {
  margin-bottom: 1rem;
}

.initial-screen .title {
  font-size: 10rem;
  font-weight: 600;
  margin-bottom: 3rem;
  color: #333;
}

.initial-screen .header .title {
  margin-bottom: 2rem; /* reduce from the default 2rem */
}

.initial-screen .header .subtitle {
  margin-top: 0.1rem; /* tighten spacing below the title */
}

.drop-zone {
  border: 2px dashed #aaa;
  border-radius: 10px;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  background-color: #fff;
  transition: border-color 0.2s ease;
}

.drop-zone:hover {
  border-color: #555;
}

.upload-error {
  color: red;
  font-size: 2rem;
  margin-top: 10px;
  text-align: center;
}

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

/* General reset for all elements */
* {
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    font-family: "Poppins", sans-serif; /* Set default font to Poppins */
}

/* Define custom CSS variables for dark mode */
:root {
    --text-color:#828282;
    --subheading-color:#A0A0A0;
    --placeholder-color:#6C6C6C;
    --primary-color:#FFF;
    --secondary-color:#E9EEF6;
    --secondary-hover-color:#DBE1EA;
}


/* Style for the body element */
body {
    background: var(--primary-color); /* Set body background color */
}

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

.header {
    margin-top:0vh;
    padding:0.5rem;
}

/* make the typing area and header a lighter color */
.header, .typing-area { 
    color: var(--text-color);  
}

/* Restricts width and centers the header, message, and typing form */
.header, .chat-list .message, .typing-form {
    max-width: 1000px;
    margin: 0 auto;
}

/* Hides the header when the 'hide-header' class is applied to the body */
body.hide-header .header{
    display: none;
}


/* Style for elements with the class title and subtitle within the header */
.header :where(.title, .subtitle) {
    font-weight: 500;
    line-height: 3.6rem;

}

/* Specific style for the title class within the header */
.header .title {
      line-height: 1.2;        /* ensure full height around text */
  display: inline-block;   /* prevent flex clipping */
  margin-bottom: 0rem;
  margin: 0;

}

.initial-screen .header .title {
    font-size: 5rem; /* or whatever size you prefer */
}

.description {
    margin-top:2rem;
    font-size: 1.4rem;
    color: var(--subheading-color);
    padding: 0 1rem;
}

.suggestion-list {
    margin-top: 9.5vh;
    list-style: none;
    display: flex;
    gap: 1.25rem;
    overflow-x:auto;  /* Enable horizontal scrolling if needed */
    scrollbar-width: none; /* Hide the scrollbar*/
}

/* Style for each suggestion item within the suggestion-list */
.suggestion-list .suggestion{
    padding:1.25rem;
    cursor:pointer;
    width: 227px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    border-radius:0.75rem;
    background: var(--secondary-color);
}

.suggestion-list .suggestion:hover{
    background: var(--secondary-hover-color);   /* Change background color on hover */

}

/* Style for the text inside each suggestion item */
.suggestion-list .suggestion .text{
    font-weight:400;
}

/* Style for icons in each suggestion item */
.suggestion-list .suggestion .icon{
    height: 42px;
    width: 42px;
    font-size: 1.3rem;
    margin-top:2.5rem;
    display: flex;
    align-items: center;
    justify-content:center;
    border-radius:50%;
    background: var(--primary-color);
}

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


.chat-list{
    padding: 2rem 1rem 25rem;
    max-height: 100vh;
    overflow-y: auto;   /* Enable vertical scrolling if content exceeds height */
    scrollbar-color: #999 transparent; /* Custom scrollbar color*/
}

.chat-list .message.incoming{
    margin-top: 1.5rem;  /* Margin above each incoming message */
}

.chat-list .message.outgoing {
    justify-content: flex-end;  /* Align messages to the right */
    text-align: right;  /* Ensure text is aligned to the right */
}

.chat-list .message.outgoing .message-content {
    flex-direction: row-reverse;  /* Reverse the order of the image and message content */
}

.chat-list .message .message-content{
    display:flex;
    gap:1.5rem;  /*gap from the image to messagr */
    width: 100%;
    align-items: center;
}

.chat-list .message .avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;  /* Ensure the image covers the element */
    border-radius: 50%;  /* Make the avatar circular */
    align-self:flex-start; /* Align avatar to the start of the container */
}

.chat-list .message .text,
.chat-list .message .loading-text {
    color: var(--text-color);
}

.chat-list .message .text.error{
    color:red;
}

/* Animation for avatar in loading messages */
.chat-list .message.loading .avatar{
    animation: rotate 3s linear infinite;
}

/* Keyframes for the rotate animation */
@keyframes rotate {
    100%{
        transform: rotate(350deg);
    }
}

/* Hide text in loading messages */
.chat-list .message.loading .text{
    display:none;
}

.chat-list .message.loading .loading-text {
    display: block;
}


/* Style for the copy icon within each message */
.chat-list .message .icon{
    height: 35px;
    width: 35px;
    display:flex;
    cursor: pointer; /* Change cursor to pointer on hover */
    font-size: 1.25rem;
    margin-left: 3.5rem;
    align-items:center;
    justify-content: center; /* Center items horizontally */
    border-radius: 50%;
    background: var (--secondary-color);
    color: var(--text-color);
    visibility: hidden; /* Initially hide the icon */
}

/* Show the icon on hover for non-loading messages */
.chat-list .message:not(.loading):hover .icon:not(.hide){
    visibility: visible;
}


.chat-list .message .icon:hover{
    background: var(--secondary-color);
}

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


.typing-area {
    position:fixed;
    width: 100%;
    bottom: 0;
    padding: 1rem;
    background: var(--primary-color);
}

/* Style for elements with the classes typing-form and action-buttons within the typing area */
.typing-area :where(.typing-form, .action-buttons) {
   display:flex;
   gap:0.75rem;
}


.typing-area .input-wrapper {
    height: 56px;
    width: 100%;
    display: flex;
    position: relative;
}

.typing-area .typing-input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-color);
    border-radius: 6.2rem;
    padding: 1.1rem 4rem 1.1rem 1.5rem;
    background: var(--secondary-color);
}

.typing-area .typing-input:focus {
    background: var(--secondary-hover-color);   /* Change background color on focus */
}

/* Style for the placeholder text within the typing input */
.typing-area .typing-input::placeholder{
    color: var(--placeholder-color);
}

/* Style for the icon within the typing are, the delete button */
.typing-area .icon {
    height: 56px;
    width: 56px;
    cursor: pointer;
    display:flex;
    align-items: center; /* Center items vertically */
    justify-content: center; /* Center items horizontally */
    border-radius: 50%;
    background: var(--secondary-color);

}

.typing-area .icon:hover {
    background: var(--secondary-hover-color)!important;   /* Change background color on hover */

}

/* style for the send icon  */
.typing-area .input-wrapper .icon{
    position: absolute;
    right: 0;
    outline:none;
    border:none;
    background: none;
    color: var(--text-color);
    transform: scale(0);
    transition: transforms 0.2s ease;
}

/* Show the icon when the typing input is valid */
.typing-area .input-wrapper .typing-input:valid~.icon{
    transform: scale(1);
}

.typing-area .disclaimer-text{
    font-size: 0.85rem;
    margin-top: 1rem;
    text-align:center;
    color: var(--placeholder-color);
}

/**************************************************************************************/
progress {
    width: 100%;
    height: 10px;
    margin-top: 10px;
    appearance: none;
}

progress::-webkit-progress-bar {
    background-color: #ddd;
    border-radius: 5px;
}

progress::-webkit-progress-value {
    background-color: black;
    border-radius: 5px;
} 



.initial-screen,
.chat-container {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* Hidden state */
.hidden {
  opacity: 0;
  visibility: hidden;
}


.drop-zone.uploaded {
  border-color: #4CAF50; /* green */
  background-color: #e8f5e9;
  color: #2e7d32;
  transition: all 0.3s ease;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;   /* ← centers the whole bar */
  gap: 20px;
  margin-bottom: 15px;
  width: 100%;               /* ensure full-width so centering works */
}

/* Slide counter styling */
.slide-counter {
  font-size: 16px;
  font-weight: 600;
  padding-top: 40px;
  padding-right: 30px;
  color: #333;
  white-space: nowrap;  /* prevents wrapping */
}
