/* General styling */
body {
    margin: 0;
    padding: 0;
    background-color: #f4f7fc;
    color: #333;
}

.container {
    position: fixed;
    z-index: 1000;
    display: flex;
    width: 100%;
    max-width: 800px; /* Maximum width for large screens */
    margin: 0 auto;
    padding: 20px;
    background-color: #1b6699;
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
    justify-content: space-evenly;
    align-items: center;
}

h1 {
    text-align: center;
    color: #d29d00;
    font-size: 2rem;
    text-shadow: 
    1px 1px 0 white,
    -1px -1px 0 white,
    -1px 1px 0 white,
    1px -1px 0 white,
    0 1px 0 white,
    0 -1px 0 white,
    1px 0 0 white,
    -1px 0 0 white; /* Black outline */
}

    * { 
        margin: 0; 
        padding: 0; 
        box-sizing: border-box;
        font-family: 'Courier New';
    }
    .chat-container {
        width: 100%;
        max-width: 800px; /* Maximum width for large screens */
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
        height: -webkit-fill-available;
        position: fixed; /* Fixed position relative to the screen */
        left: 50%; /* Align horizontally to the center */
        transform: translateX(-50%); /* Offset by 50% of its width to center it */
}


    #chat {
        overflow-y: auto;
        max-height: -webkit-fill-available;
        position: fixed; /* Fixed position relative to the screen */
        width: -webkit-fill-available;
        margin: 0px 20px 0 20px;
    }

    .chat-containera {
        width: 100%;
        max-width: 800px; /* Maximum width for large screens */
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
        height: -webkit-fill-available;
        position: fixed; /* Fixed position relative to the screen */
        left: 50%; /* Align horizontally to the center */
        transform: translateX(-50%); /* Offset by 50% of its width to center it */
}
    .message {
        margin-top: 15px;
        margin-bottom: 15px; 
        padding: 10px;  
        max-width: 80%; 
        clear: both;
        font-size: 1.3em;
        width: fit-content;
    }
    .message.you {
        background-color: #d29d00;
        margin-top: 15px;
        margin-left: auto;
        color: white;
        border-radius: 8px 0 8px 8px;
}
    .message.ai {
        background-color: #1b6699;
        margin-right: 0px;
        color: white;
        border-radius: 0 8px 8px 8px;
    }
    .message.qat {
        background-color: #1b6699;
        margin-right: auto;
        color: white;
        border-radius: 0 8px 8px 8px;
    }
    .message p { 
        margin: 0; 
    }

    .input-container { 
        display: flex; 
        padding: 15px; 
        border-top: 1px solid #e5e7eb; 
        background-color: #f9fafb;
        position: fixed; /* Fixed position relative to the screen */
        width: -webkit-fill-available;
        bottom: 0;
    }

    .input-container input { 
        flex: 1; 
        padding: 10px; 
        border: 1px solid #d1d5db; 
        border-radius: 5px; 
        margin-right: 10px; 
        font-size: 1.3em; 
    }
    .input-container button { 
        padding: 10px 15px;
        background-color: #d29d00;
        color: #ffffff; 
        border: none; 
        border-radius: 5px; 
        cursor: pointer; 
        font-size: 1.3em;
        font-weight: bolder;
    }
    .button_s {
        border: none; 
        border-radius: 5px; 
        cursor: pointer;
        width: 30px;
    }
    .nav_l {
        border: none; 
        border-radius: 20px;
        margin: 5vh auto;
        width: 180px;
    }
    .impact {
        width: 25px;
        margin: 0 4px 0 8px;
    }
    #update-button, #download-button {
        display: none;
    }

    .no-question-notification {
        position: fixed; 
        top: 50%; 
        left: 50%; 
        transform: translate(-50%, -50%);
        color: white;
        padding: 20px; 
        border-radius: 8px;
        border: 2px solid white;
        text-align: center; 
        font-size: 1.3em;
        text-shadow: 0 0 1px currentColor;
        filter: drop-shadow(0 0 4px currentColor);
    }

    .cs {
        background-color: #d29d00;
        position: fixed; 
        top: 50%; 
        left: 50%; 
        transform: translate(-50%, -50%);
        color: white;
        padding: 20px; 
        border-radius: 8px;
        text-align: center; 
        font-size: 1.3em;
        filter: drop-shadow(0 0 4px currentColor);
        z-index: 10000;
    }

    .no_q {
        width: 100%;
        height: 100%;
        position: fixed;
        background-color: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
    }

    .copi.ai {
        align-content: end;
        margin-top: auto;
        margin-bottom: 15px;
        font-size: 1.5em;
        cursor: default;
    }

    .copi.you {
        display: none;
    }
  
  .copy-notification {
    transition: opacity 0.7s ease;
    pointer-events: none; /* Prevent the notification from being interactable */
  }

.menu-btn {
  background-color: inherit;
  color: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.drawer {
    opacity: 1;
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background-color: #333;
  color: white;
  transition: left 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 999;
}

.drawer.open {
  left: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: #444;
}

.drawer-header h2 {
  margin: auto;
}

.drawer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #444;
    position: inherit;
    bottom: 0;
    width: inherit;
}
.drawer-footer h3 {
  margin: auto;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.drawer-menu {
  list-style: none;
  margin-top: 20px;
  padding: 0;
}

.drawer-menu li {
  padding: 10px 20px;
}

.drawer-menu li a {
  text-decoration: none;
  color: white;
  display: block;
  transition: background 0.3s;
}

.drawer-menu li a:hover {
  background: #555;
}

.dim {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    backdrop-filter: blur(5px);
}

.hhmm {
    font-size: 1rem;
    font-weight: bolder;
    display: flex;
    justify-content: flex-end;
}

.dim.active {
    visibility: visible;
    opacity: 1;
}

.file {
    text-decoration: none;
    font-size: xx-large;
}

.icon {
    margin-top: 15px;
}

.icon.ai {
    border-radius: 50% 0 0 50%;
    width: 10px;
    height: 15px;
    background-color: #1b6699;
}

.icon.qat {
    border-radius: 50% 0 0 50%;
    width: 10px;
    height: 15px;
    background-color: #1b6699;
}

.icon.you {
    border-radius: 0 50% 50% 0;
    width: 10px;
    height: 15px;
    background-color: #d29d00;
}

.messageHolder.ai {
    display: flex;
    justify-content: flex-start;
    filter: drop-shadow(7px 4px 5px rgba(0, 0, 0, 0.7));
}

.messageHolder.you {
    filter: drop-shadow(-7px 4px 5px rgba(0, 0, 0, 0.7));
}

.messageHolder.qat {
    display: flex;
    filter: drop-shadow(7px 4px 5px rgba(0, 0, 0, 0.7));
}

.messageContent.ai {
  display: flex;
  justify-content: flex-start;
}

.messageContent.you {
  display: flex;
  justify-content: flex-end;
  flex-direction: row-reverse;
}

.messageContent.qat {
  display: flex;
  justify-content: flex-start;
}

.audio-icon {
  cursor: pointer;
  font-size: 20px;
  margin: auto;
  color: #d29d00;
  transition: transform 0.2s;
}
.audio-icon:hover {
  transform: scale(1.1);
}

.selector {
    border: none;
    margin: 10px 20px;
    padding: 12px;
    border-radius: 5px;
    font-size: inherit;
}

.scroll-to-bottom {
    position: fixed;
    bottom: 80px;
    justify-self: anchor-center;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0);
    color: white;
    border: 1px solid white;
    border-radius: 45%;
    width: 30px;
    height: 30px;
    font-size: 24px;
    cursor: default;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    filter: drop-shadow(0 0 4px currentColor);
    backdrop-filter: blur(5px);
}

.scroll-to-bottom:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.scroll-to-bottom:active {
  transform: scale(0.95);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
    }
  .copy-notification {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6rem;
    }
    .message, .selector, .drawer {
        font-size: 1.15em;
        text-shadow:
        0.5px 0 currentColor,
        -0.5px 0 currentColor,
        0 0.5px currentColor,
        0 -0.5px currentColor;
    }
    #chat {
        margin: 0px 10px 0 10px;
    }
    .copy-notification {
    font-size: 1rem;
    }
    .no-question-notification, .cs, .scroll-to-bottom {
        font-size: 1.15em;
        text-shadow:
        0.5px 0 currentColor,
        -0.5px 0 currentColor,
        0 0.5px currentColor,
        0 -0.5px currentColor;
    }

    .input-container input {
        font-size: 1.15em;
        text-shadow:
        0.5px 0 currentColor,
        -0.5px 0 currentColor,
        0 0.5px currentColor,
        0 -0.5px currentColor;
    }
    .input-container button {
        font-size: 1.15em;
        text-shadow:
        0.5px 0 currentColor,
        -0.5px 0 currentColor,
        0 0.5px currentColor,
        0 -0.5px currentColor;
    }
}

#typing-effect {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px; /* Space between dots */
}

#typing-effect span {
  width: 7px; /* Diameter of the dots */
  height: 7px;
  background-color: #d29d00; /* Color of the dots */
  border-radius: 50%; /* Make them circular */
  animation: blink 1.5s infinite;
}

/* Delay each dot's animation to create the sequence */
#typing-effect span:nth-child(1) {
  animation-delay: 0s;
}

#typing-effect span:nth-child(2) {
  animation-delay: 0.3s;
}

#typing-effect span:nth-child(3) {
  animation-delay: 0.6s;
}

/* Animation for blinking effect */
@keyframes blink {
  0%, 80%, 100% {
    opacity: 0.3; /* Faded dots */
  }
  40% {
    opacity: 1; /* Bright dots */
  }
}
