html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  min-width: 100vw;
  background: url('/static/background.jpg') no-repeat center center fixed;
  background-size: cover;
  font-family: 'Segoe UI', Arial, sans-serif;
  position: relative;
}

#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 950;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 1.1rem;
}

.brand-logo {
  width: 40px;
  height: auto;
}

#user-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #0b2e4f;
}

#user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.65);
  object-fit: cover;
  background-color: rgba(255, 255, 255, 0.7);
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

#user-name {
  font-weight: 300;
  font-size: 1rem;
}

#user-domain {
  font-size: 0.85rem;
  color: rgba(11, 46, 79, 0.7);
}

#logout-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: rgba(25, 118, 210, 0.85);
  color: #fff;
  cursor: pointer;
  font-weight: 300;
  transition: background 0.2s ease, transform 0.2s ease;
}

#logout-btn:hover {
  background: rgba(13, 71, 161, 0.95);
  transform: translateY(-1px);
}


/* Chat history */
#chat-history {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 84px;
  width: 100vw;
  max-width: 95vw; 
  padding-left: 12px;
  padding-right: 12px;
  margin: 0 auto;
  display: flex;
  flex-direction: column-reverse;
  padding: 24px 0 0 0;
  overflow-y: auto;
  z-index: 100;
}

.msg-row {
  display: flex;
  flex-direction: row;
  margin: 6px 0px;
}

.msg-sent { justify-content: flex-end; }
.msg-received { justify-content: flex-start; }

.msg-bubble {
  max-width: 100%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 1.12em;
  word-break: break-word;
  background: rgba(33,150,243,0.92);
  color: #fff;
  margin: 2px 0;
  box-shadow: 0 2px 8px #0002;
  min-width: 60px;
  position: relative;
  overflow-x: auto;
}

.thinking-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-style: italic;
  color: rgba(17, 17, 17, 0.8);
}

.thinking-label {
  letter-spacing: 0.05em;
}

.thinking-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.thinking-indicator--left {
  flex-direction: row-reverse;
}

.thinking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.25;
  transform: scale(0.85);
  animation: thinkingPulse 1.6s infinite ease-in-out;
}

.thinking-dot:nth-child(1) {
  background: #ff6f61;
}

.thinking-dot:nth-child(2) {
  background: #ffca28;
  animation-delay: 0.18s;
}

.thinking-dot:nth-child(3) {
  background: #66bb6a;
  animation-delay: 0.36s;
}

.thinking-indicator--right .thinking-dot {
  animation-direction: reverse;
}

@keyframes thinkingPulse {
  0%, 100% {
    opacity: 0.25;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.thinking-bubble .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Sent message styling */
.msg-sent .msg-bubble {
  background: rgba(33,150,243,0.93);
  color: #fff;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 4px;
  margin-right: 24px;
  margin-left: 70px;
  align-self: flex-end;
  text-align: right;
}

/* Received message styling */
.msg-received .msg-bubble {
  background: rgba(255,255,255,0.88);
  color: #111;
  border-bottom-left-radius: 4px;
  border-top-left-radius: 4px;
  margin-left: 24px;
  margin-right: 70px;
  align-self: flex-start;
  text-align: left;
  /* display: flex;
  align-items: center; /* vertically center text/content */   */
}

/* Markdown table rendering */
.msg-bubble table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  font-family: monospace;
  border-collapse: collapse;
  margin-top: 10px;
  white-space: nowrap;
}

.msg-bubble th,
.msg-bubble td {
  border: 1px solid #ccc;
  padding: 4px 8px;
  text-align: left;
  vertical-align: top;
  background-color: #fff;
  color: #000;
  white-space: nowrap;
}

.msg-received .msg-bubble table {
  background-color: #f9f9f9;
}

.msg-sent .msg-bubble table {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Scrollbar for wide tables */
.msg-bubble::-webkit-scrollbar {
  height: 8px;
}

.msg-bubble::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.msg-bubble::-webkit-scrollbar-track {
  background: #eee;
}

/* Input bar */
#input-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: rgba(30,30,30,0.75);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 12px;
  z-index: 200;
  box-sizing: border-box;
}

/* Input wrapper */
.input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  flex: 1;
}

/* Text area */
#transcript-input {
  flex: 1;
  padding: 10px 36px 10px 12px;
  font-size: 1.15em;
  border: none;
  border-radius: 8px;
  background: rgba(0,0,0,0.3);
  color: #fff;
  min-height: 44px;
  resize: none;
  outline: none;
  margin: 0;
}

/* Toggle icon */
#toggle-suggestions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #bbb;
  z-index: 3;
  padding: 0;
}

#toggle-suggestions:hover {
  color: #fff;
}

/* Suggestion bubbles */
#floating-suggestions {
  position: absolute;
  top: 6px;
  right: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  z-index: 2;
  pointer-events: auto;
}

.suggestion-bubble {
  background-color: #dfefff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  border: 1px solid #aad;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

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

/* Send button */
#send-btn {
  background: #2196f3;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1em;
  cursor: pointer;
  box-shadow: 0 2px 4px #0003;
  transition: background 0.15s;
  margin-left: 10px;
}

#send-btn:hover {
  background: #1565c0;
}

#help-btn {
  position: absolute;
  right: 12px;
  bottom: 42px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #bbb;
  z-index: 3;
  padding: 0;
}

#help-btn:hover {
  color: #fff;
}

/* Mic buttons */
#mic-btn, #disable-mic-btn {
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.13);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
  font-size: 2em;
  color: #333;
  margin-left: 4px;
}

#disable-mic-btn {
  background: #f44336;
  color: #fff;
  display: none;
}

/* Mic on animation */
#mic-btn.animate-off {
  animation: shake 0.4s;
  box-shadow: 0 0 16px 2px #ff4c4c;
  border: 2px solid #ff4c4c;
}

@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
  100% { transform: translateX(0); }
}

#mic-btn.listening {
  color: #12b600;
  background: #e6ffe6;
  box-shadow: 0 0 0 0 #12b60080, 0 2px 8px #12b60055;
  animation: mic-pulse 1s infinite;
}

@keyframes mic-pulse {
  0% {
    box-shadow: 0 0 0 0 #12b60080, 0 2px 8px #12b60055;
  }
  70% {
    box-shadow: 0 0 0 12px #12b60022, 0 2px 8px #12b60055;
  }
  100% {
    box-shadow: 0 0 0 0 #12b60000, 0 2px 8px #12b60055;
  }
}

/* Responsive layout */
@media (max-width: 600px) {
  #chat-history { max-width: 100vw; padding-top: 10px; }
  #input-bar { padding: 6px 4px 10px 4px; }
  #mic-btn, #disable-mic-btn { width: 42px; height: 42px; font-size: 1.15em; }
  #send-btn { padding: 7px 10px; font-size: .97em; }
  #transcript-input { min-height: 34px; font-size: 1em; padding: 8px 36px 8px 10px; }
  #toggle-suggestions { font-size: 14px; right: 8px; bottom: 8px; }
  .msg-sent .msg-bubble, .msg-received .msg-bubble {
    margin-right: 10px; margin-left: 10px;
  }
}

.glass {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.glass-effect {
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* Help overlay */
#help-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#help-content {
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px;
  color: #000;
  background: rgba(255,255,255,0.9);
}
#help-close {
  margin-top: 10px;
  padding: 8px 12px;
  border: none;
  background: #2196f3;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

/* Proper formatting for code blocks in markdown */
.msg-bubble pre {
  background-color: #2d2d2d;
  color: #f8f8f2;
  padding: 12px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-x: auto;
  margin-top: 10px;
}

.msg-bubble code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-family: monospace;
  font-size: inherit;
}

#language-selector-container {
  position: fixed;
  top: 12px;
  right: 20px;
  z-index: 1000;
}

#language-selector {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* .chat-chart {
  width: 100%;
  height: 320px;
  margin-top: 10px;
}

 */
.chart-container {
  width: 100% !important;   /* take full width of parent */ */
  max-width: 100%;          /* prevent overflow */
  height: 400px;
}


 

