* {
  padding: 0;
  margin: 0;
  text-decoration: none;
  list-style: none;
  box-sizing: border-box;
}
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #555; }


/* Main chat container */
.chat-container {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 800px;
  z-index: 10000;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* Combined wrapper for button and chat */
.chat-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  transition: all 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  max-height: 80px;
  min-height: 80px;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: rgb(0 0 0 / 10%) 0px 1px 6px, rgb(0 0 0 / 20%) 0px 2px 24px;
}

.chat-wrapper.expanded {
  max-height: 80vh;
  min-height: 60vh;
  border-radius: 10px;
}

.chat-window2 {
  display: none;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 30px 0;
}
.chat-wrapper.expanded .chat-window2 { display: flex; }

/* Message container */
.message-box {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  width: 100%;
  padding: 0 42px;
  overflow-y: auto;
  scroll-behavior: smooth;
  /*display: flex;
  flex-direction: column;*/
  text-align: right;
}

.message-box li {
    font-size: 14px;
    list-style: disc;
    margin-bottom: 1.1em;
}
/* Welcome message */
.hi-there {
  color: #333645;
  padding: 20px 0;
  border-radius: 5px;
  margin-bottom: 15px;
  line-height: 2em;
  text-align: left;
}
.hi-there .p1 { font-size: 20px; }
.hi-there .p2 { font-size: 14px; }

/* User message styles */
.message-box .first-chat {
  display: inline-block;           /* Inline block so width = content */
  max-width: 70%;                  /* Limit width for long messages */
  background: #EAEBF0;
  border-radius: 20px;
  padding: 20px;
  margin: 8px 0;
  margin-left: auto;               /* Push to right edge */
  text-align: left;                /* Text alignment inside bubble */
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.message-box .first-chat p {
  font-size: 14px;
  margin: 0;
  overflow-wrap: break-word;
  font-weight: 400;
}

/* AI message styles */
.message-box .second-chat {
  width: auto;
  padding: 10px;
  margin: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: start;
  text-align: left;
}
.message-box .second-chat p {
  padding: 12px 15px;
  margin: 0;
  border-radius: 15px 15px 0 15px;
  color: #000;
  font-size: 14px;
  line-height: 1.6em;
}

/* Growing and fading in answer bubble */
.answer-grow {
  height: 0;
  opacity: 0;
  overflow: hidden;
  transition: height 2s cubic-bezier(0.4,0,0.2,1), opacity 1s;
  will-change: height, opacity;
}

/* Typing indicator */
.typing-indicator {
  min-height: 120px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  height: 120px;
  margin: 10px 0;
}
.lottie-animation {
  width: 120px;
  height: 120px;
}
.chat-spacer {
  width: 100%;
  transition: height 1s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
}
/* Markdown styling */
.markdown-content {
  line-height: 1.5;
  width: 100%;
}
.markdown-content h1, .markdown-content h2 { margin: 10px 0; }
.markdown-content ul { list-style-type: disc; margin: 10px 0 10px 20px; font-size: 14px; }
.markdown-content ul li { list-style: disc; }
.markdown-content ol { list-style-type: decimal; margin: 10px 0 10px 20px; }
.markdown-content p { margin: 10px 0; }
.markdown-content code {
  display: inline-block;
  background-color: #f4f4f4;
  color: #c7254e;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}
.markdown-content pre {
  background-color: #f4f4f4;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
}
.markdown-content a { color: #007bff; text-decoration: none; }
.markdown-content a:hover { text-decoration: underline; }

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.overlay.show { opacity: 1; pointer-events: auto; }

/* Trigger button */
.chat-trigger {
  width: 100%;
  transition: opacity 0.2s ease;
}
.chat-wrapper.expanded .chat-trigger { display: none; }

.glow { position:relative; padding:2px; border-radius:22px; overflow:hidden; background:#d9e3e2; box-shadow:0 18px 45px rgba(10,39,45,.10),0 2px 7px rgba(10,39,45,.07); }
.glow::before { content:""; position:absolute; inset:-150%; background:conic-gradient(from 0deg,transparent 0 25%,color-mix(in srgb,var(--got-ai-primary) 28%,transparent) 35%,color-mix(in srgb,var(--got-ai-primary) 82%,white) 50%,transparent 65% 100%); animation:got-ai-orbit 4s linear infinite; }
.shell { position:relative; min-height:80px; border:0; border-radius:21px; width:100%; background:rgba(255,255,255,.96); padding:0 29px; color:inherit; text-align:left; cursor:text; overflow:hidden; display:grid; align-items:center; isolation:isolate; font-family:inherit; }
.shell::after { content:""; position:absolute; inset:0; background:linear-gradient(110deg,color-mix(in srgb,var(--got-ai-primary) 4%,transparent),transparent 44%); pointer-events:none; }
.idle,.entry { grid-area:1/1; transition:opacity .38s ease,transform .48s cubic-bezier(.2,.75,.25,1),visibility .38s; }
.idle { display:flex; align-items:center; justify-content:space-between; width:100%; opacity:1; transform:none; }
.trigger-arrow { display:flex; align-items:center; color:var(--got-ai-trigger-text-color, #112d34); }
.trigger-arrow svg { width:28px; height:auto; }
.intro { min-width:0; display:flex; align-items:baseline; gap:13px; }
.shell .title { flex:0 0 auto; font-size:15px; font-weight:600; letter-spacing:-.025em; color:var(--got-ai-trigger-text-color, #112d34); }
.shell .example { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--got-ai-trigger-text-color, #112d34); font-size:15px; transition:opacity .32s ease,transform .32s ease; }
.shell .example.leaving { opacity:0; transform:translateY(-7px); }
.shell .example.entering { opacity:0; transform:translateY(7px); }
.entry { opacity:0; transform:translateY(8px); visibility:hidden; display:flex; align-items:center; gap:12px; }
.shell input { appearance:none; border:0; outline:0; background:transparent; width:100%; min-width:0; padding:22px 0; color:#102d34; font-size: 15px; line-height: 1.35; font-family: inherit; font-weight: 400; caret-color:var(--got-ai-primary); }
.shell input::placeholder { color:#718489; opacity:1; }
.send { flex:0 0 auto; width:46px; height:46px; border-radius:50%; border:0; background:var(--got-ai-primary); color:white; display:grid; place-items:center; cursor:pointer; transition:transform .2s ease,filter .2s ease,box-shadow .2s ease; box-shadow:0 8px 20px color-mix(in srgb,var(--got-ai-primary) 26%,transparent); }
.send:hover { transform:translateY(-1px); filter:brightness(.94); }
.send:active { transform:scale(.96); }
.send:focus-visible { outline:3px solid color-mix(in srgb,var(--got-ai-primary) 30%,white); outline-offset:3px; }
.send svg { width:19px; height:19px; }
.shell.is-active .idle { opacity:0; transform:translateY(-8px); visibility:hidden; }
.shell.is-active .entry { opacity:1; transform:none; visibility:visible; }
.shell:focus-visible { outline:3px solid color-mix(in srgb,var(--got-ai-primary) 28%,white); outline-offset:-5px; }

@keyframes got-ai-orbit { to { transform:rotate(360deg); } }

/* Close button */
.chat-bar-close {
  position: absolute;
  top: 10px;
  right: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}
.chat-wrapper.expanded .chat-bar-close { opacity: 1; }
.chat-bar-close button {
  background-color: #ffffff!important;
  cursor: pointer;
  padding: 1px;
  border-style: none;
  vertical-align: middle;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 20px;
  color: #333333!important;
}
.grad-bg {
    padding: 15px;
    background: linear-gradient(0deg, #fff, transparent);
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  background: #fff;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid #e3e3e3;
  padding: 10px 14px;
  text-align: left;
}

.markdown-content th {
  background: #f5f6fa;
  color: #0000CD;
}

.markdown-content tr:nth-child(even) td {
  background: #fafbfc;
}

.markdown-content tr:hover td {
  background: #f0f5ff;
}

/* Optional: rounded corners for the table */
.markdown-content table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
/* Animations */
.fade-in { animation: fadeIn 0.5s ease-in-out forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Responsive styles */
@media screen and (max-width: 768px) {
  .chat-container { width: 95%; bottom: 10px; }
  .chat-wrapper.expanded { max-height: 85vh; min-height: 65vh; }
  .message-box .first-chat, .message-box .second-chat { max-width: 85%; }
}
@media screen and (max-width: 480px) {
  .chat-trigger {
    height: auto;
  }
  .glow { border-radius:19px; }
  .shell { min-height:76px; border-radius:18px; padding:0 18px; }
  .idle { display:flex; align-items:center; justify-content:space-between; width:100%; }
  .intro { display:flex; flex-direction:column; gap:2px; align-items:flex-start; }
  .shell input { padding:18px 0; font-size:15px; font-weight: 400; }
  
  .chat-wrapper {
    max-height: 80px;
    min-height: 80px;
  }
  .hi-there .p1 {
    font-size: 18px;
  }
  .message-box {
    padding: 10px;
  }
  .input-container-wrapper {
    padding: 0 15px 5px !important;
  }
}
@media (prefers-reduced-motion:reduce) {
  .glow::before { animation:none; background:linear-gradient(110deg,transparent 10%,color-mix(in srgb,var(--got-ai-primary) 55%,white),transparent 90%); }
  .idle,.entry,.example,.send { transition:none; }
}