    :root {
      --primary:   #005b96;   /* darker, richer blue */
      --secondary: #eef6fc;   /* very light blue */
      --accent:    #0077b6;   /* mid-tone blue for buttons */
      --success:   #28a745;   /* green for user bubble */
      --bot-bg:    var(--secondary);
      --user-bg:   #d4f1d4;   /* lighter green */
      --text:      #1b3465;
      --radius:   12px;
    }
    
    * { box-sizing: border-box; margin: 0; padding: 0; }

    .message {
      max-width: 80%;
      padding: .75rem 1rem;
      margin: .6rem 0;
      position: relative;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      border-radius: var(--radius);
      line-height: 1.5;
    }

    /* user message styling */
    .message.user {
  background: var(--user-bg);
  border-right: 4px solid var(--success);
  margin-left: auto;
  border-radius: var(--radius) var(--radius) 0 var(--radius);
}
    .message.user .message-content {
      white-space: pre-wrap;
      line-height: 1.6;
    }
    
    
    ul.ragsources {
      list-style-type: disc !important;
      margin-right: 20px !important;
    }
    
    .chat-container {
      display: flex;
    flex-direction: column;
    height: 50vh;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
    background-color: white;
    margin-top: 10px;
}


    .container {
        
     /* max-width: 800px;*/
      margin: auto;
     /* background: #fff;*/
      border-radius: 8px;
      overflow: hidden;
     /* box-shadow: 0 4px 12px rgba(0,0,0,.1);*/
    }

    /* HEADER */
    .chat-header {
      background: #002D6A;
      color: #fff;
      padding: .75rem 1rem;
      display: flex;
      border-radius: var(--radius);
      align-items: center;
      justify-content: space-between;
    }
    .chat-header h1 {
      font-size: 1.2rem;
    }
    .chat-header select {
      padding: .4rem .6rem;
      font-family: 'Lotus Linotype' !important;
      font-size: 21px;
      border-radius: 4px;
      border: none;
      outline: none;
    }

    /* CHAT AREA */
    .chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  scroll-behavior: smooth;
}
    .message.bot {
      background: var(--bot-bg);
      border-left: 4px solid var(--primary);
      margin-right: auto;
      border-radius: var(--radius) var(--radius) var(--radius) 0;
    }
    .message.bot .actions {
      /* remove absolute positioning */
      position: static;
      display: flex;
      gap: .5rem;
      margin-top: 1rem;          /* space above the buttons */
      justify-content: flex-start; /* align left; use flex-end for right */
    }
    
    .message.bot .actions button {
      background: none;
      border: none;
      cursor: pointer;
      padding: .25rem;
      color: var(--primary);
      font-size: 1.1rem;
      border-radius: 4px;
    }
    .message.bot .actions button:hover {
      background: var(--action-hover);
    }
    .message-content {
    font-size: 21px !important;
    font-family: 'Lotus Linotype' !important;
      margin-top: 1.5rem;
      white-space: pre-wrap;
      line-height: 1.6;
    }
    .sources {
        font-family: sans-serif;
      margin-top: 1rem;
      color: #555;
      font-size: .95rem;
    }
    .sources ul {
      padding-inline-start: 1.25rem;
      margin-top: .5rem;
    }
    .sources a {
      color: var(--primary);
      text-decoration: none;
    }
    .sources a:hover {
      text-decoration: underline;
    }

    /* FEEDBACK PANEL */
    .feedback-options {
      display: none;
      background: #fff;
      border: 1px solid #ccc;
      border-radius: 4px;
      padding: 1rem;
      margin-top: 1rem;
    }
    .feedback-options.show {
      display: block;
    }
    .feedback-options .options {
      display: flex;
      flex-direction: column;
      gap: .5rem;
    }
    .feedback-options textarea {
      width: 100%;
      height: 80px;
      margin-top: .5rem;
      padding: .5rem;
      border: 1px solid #ccc;
      border-radius: 4px;
      resize: vertical;
    }
    .feedback-options button {
      margin-top: .75rem;
      padding: .5rem 1.2rem;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
    }

    /* INPUT AREA */
    .chat-input {
 /* background: #fff;
  padding: .75rem;*/
  border-top: 1px solid #eee;
  display: flex;
  gap: .5rem;
}
    .chat-input textarea {
      flex: 1;
      padding: .6rem;
      border: 1px solid #ccc;
      border-radius: 4px;
      resize: none;
      font-family: inherit;
      font-size: 21px;
      font-family: 'Lotus Linotype' !important;
    }
    .chat-input button {
      padding: .6rem 1.5rem;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      font-size: 1rem;
    }
    
    .chat-input button,
.actions button {
    font-family: 'Lotus Linotype' !important;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .6rem 1rem;
  font-size: 21px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s;
}
.chat-input button:hover,
.actions button:hover {
  background: #005c9e;
}

    
    /* ───── Loading bubble ───── */
    .message.bot.loading {
      position: relative;
      background: var(--bot-bg);
      border-left: 4px solid var(--primary);
      padding: 1rem;
      margin-bottom: 1.5rem;
      border-radius: 4px;
      opacity: 0.8;
    }
    .loading-dots {
      display: inline-flex;
      align-items: center;
      gap: .4rem;
    }
    .loading-dots span {
      width: 8px;
      height: 8px;
      background: var(--primary);
      border-radius: 50%;
      animation: blink 1s infinite ease-in-out;
    }
    .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
    .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
    
    @keyframes blink {
      0%, 80%, 100% { opacity: 0.2; transform: scale(1); }
      40%         { opacity: 1;   transform: scale(1.3); }
    }


.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 6px;
  font-size: .95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}
.toast.show {
  opacity: 1;
}    

.right-nav {
    width: 100% !important;
}