:root {
  --chatbot-accent: #4cc9f0;
  --chatbot-accent-2: #7b61ff;
  --chatbot-bg: rgba(8, 12, 24, 0.95);
  --chatbot-panel: rgba(14, 20, 36, 0.95);
  --chatbot-border: rgba(255, 255, 255, 0.12);
  --chatbot-text: #f5f7ff;
  --chatbot-muted: #9fb0c9;
}

.chatbot-launcher {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1100;
  display: none;
  align-items: center;
  gap: 0.6rem;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(135deg, var(--chatbot-accent), var(--chatbot-accent-2));
  color: white;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(76, 201, 240, 0.25);
  cursor: pointer;
}

.chatbot-launcher:focus-visible,
.chatbot-close:focus-visible,
.chat-start-button:focus-visible,
.chat-welcome-suggestions button:focus-visible,
.quick-action:focus-visible,
.chatbot-input-row input:focus-visible,
.chatbot-input-row button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.chatbot{
    position:fixed;
    right:1.25rem;
    bottom:5.6rem;
    z-index:1090;

    width:380px;
    height:700px;

    max-width:95vw;
    max-height:85vh;

    display:flex;

    opacity:0;
    pointer-events:none;
    transform:translateY(12px) scale(.96);
    transition:.2s;
}

.chatbot.chat-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-welcome[hidden],
.chat-session[hidden] {
  display: none !important;
}

.chatbot-shell{

display:flex;

flex-direction:column;

width:100%;
height:100%;

background:var(--chatbot-panel);

border-radius:20px;

overflow:hidden;

}

.chatbot-header{

flex-shrink:0;

display:flex;

align-items:center;

padding:18px;

gap:12px;

border-bottom:1px solid rgba(255,255,255,.08);

}

.chatbot-header>div{

flex:1;

}

.chatbot-back{

background:none;

border:none;

color:#fff;

font-size:20px;

cursor:pointer;

padding:8px;

margin-right:8px;

display:flex;

align-items:center;

justify-content:center;

transition:.3s;

}

.chatbot-back:hover{

color:#4cc9f0;

transform:translateX(-2px);

}

.chatbot-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--chatbot-text);
}

.chatbot-header p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--chatbot-muted);
}

.chatbot-close {
  border: none;
  background: transparent;
  color: var(--chatbot-text);
  font-size: 1.4rem;
  cursor: pointer;
  min-width: 2rem;
  min-height: 2rem;
}

.chatbot-window{

flex:1;

display:flex;

flex-direction:column;

min-height:0;

overflow:hidden;

}

.chat-welcome {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 1.1rem;
  min-height: 0;
}

.chat-welcome-card{

width:100%;

max-width:none;

display:flex;

flex-direction:column;

gap:18px;

}

.chat-welcome-icon,
.chat-start-icon {
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--chatbot-accent), var(--chatbot-accent-2));
  box-shadow: 0 10px 26px rgba(76, 201, 240, 0.2);
}

.chat-welcome-icon {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  font-size: 1.2rem;
}

.chat-welcome h2 {
  margin: 0;
  color: var(--chatbot-text);
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  line-height: 1.15;
}

.chat-welcome-subtitle,
.chat-welcome-copy,
.chat-history-empty {
  margin: 0;
  color: var(--chatbot-muted);
}

.chat-welcome-subtitle {
  font-size: 0.96rem;
  color: var(--chatbot-text);
}

.chat-welcome-copy {
  max-width: 29rem;
  font-size: 0.82rem;
  line-height: 1.55;
}

.chat-start-actions{

display:flex;

flex-direction:column;

gap:14px;

}

.chat-start-button {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 4.2rem;
  padding: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.07);
  color: var(--chatbot-text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.chat-start-button.primary {
  background: linear-gradient(135deg, rgba(76, 201, 240, 0.18), rgba(123, 97, 255, 0.2));
  border-color: rgba(76, 201, 240, 0.34);
}

.chat-start-button:hover:not(:disabled),
.chat-welcome-suggestions button:hover {
  transform: translateY(-2px);
  border-color: rgba(76, 201, 240, 0.48);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
}

.chat-start-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.chat-start-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.7rem;
  font-size: 0.95rem;
}

.chat-start-button strong,
.chat-start-button small {
  display: block;
}

.chat-start-button strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.chat-start-button small {
  margin-top: 0.18rem;
  color: var(--chatbot-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.chat-history-empty {
  width: 100%;
  padding: 0.56rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.78rem;
}

.chat-welcome-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.chat-welcome-suggestions button {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--chatbot-text);
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1.2;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.chat-welcome-suggestions i {
  color: var(--chatbot-accent);
  font-size: 0.72rem;
}

.chat-session{

display:flex;

flex-direction:column;

flex:1;

min-height:0;

overflow:hidden;

}

.chatbot-messages{

flex:1;

overflow-y:auto;

padding:16px;

display:flex;

flex-direction:column;

gap:12px;

min-height:0;

}

.chatbot-messages::-webkit-scrollbar {
  width: 8px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(76, 201, 240, 0.7), rgba(123, 97, 255, 0.7));
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.08);
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  max-width: 90%;
}

.chat-message.user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-message.assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  line-height: 1.5;
  color: var(--chatbot-text);
  background: rgba(255, 255, 255, 0.08);
}

.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, var(--chatbot-accent), var(--chatbot-accent-2));
}

.chat-meta {
  font-size: 0.72rem;
  color: var(--chatbot-muted);
}

.chatbot-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
}

.quick-action {
  border: 1px solid var(--chatbot-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--chatbot-text);
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-size: 0.8rem;
}

.chatbot-input-row{

display:flex;

align-items:center;

gap:12px;

padding:16px;

background:#151d30;

border-top:1px solid rgba(255,255,255,.08);

flex-shrink:0;

}

.chatbot-input-row input{

flex:1;

height:48px;

padding:0 18px;

border:none;

outline:none;

border-radius:999px;

background:rgba(255,255,255,.08);

color:#ffffff;

font-size:15px;

font-family:inherit;

box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);

transition:.3s;

}

.chatbot-input-row input::placeholder{

color:#9fb0c9;

}

.chatbot-input-row input:focus{

background:rgba(255,255,255,.12);

box-shadow:
0 0 0 2px rgba(76,201,240,.45);

}



.chatbot-input-row button{

height:48px;

padding:0 22px;

border:none;

border-radius:999px;

background:linear-gradient(135deg,#4cc9f0,#7b61ff);

color:#fff;

font-weight:600;

cursor:pointer;

transition:.3s;

}

.chatbot-input-row button:hover{

transform:translateY(-1px);

box-shadow:0 8px 20px rgba(76,201,240,.35);

}


.chatbot-input-row input{

appearance:none;

-webkit-appearance:none;

}


.chatbot-input-row input:disabled,
.chatbot-input-row button:disabled,
.quick-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.typing-indicator .chat-bubble {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
}

.typing-indicator .chat-bubble span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--chatbot-accent), var(--chatbot-accent-2));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
  animation: chatPulse 1.2s ease-in-out infinite;
}

.typing-indicator .chat-bubble span:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-indicator .chat-bubble span:nth-child(3) {
  animation-delay: 0.32s;
}

@media (max-width: 768px) {
  .chatbot-launcher {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  .chatbot-launcher {
    right: 0.9rem;
    bottom: 0.9rem;
  }

  .chatbot {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 4.9rem;
    width: auto;
    max-height: 72vh;
  }

  .chatbot-window {
    height: min(72vh, 540px);
  }

.chat-welcome{

flex:1;

overflow-y:auto;

padding:20px;

}

  .chat-welcome-card {
    max-width: none;
    padding: 1rem;
  }

  .chat-start-actions {
    gap: 0.62rem;
  }

  .chat-start-button {
    min-height: 3.9rem;
  }

  .chat-welcome-suggestions {
    justify-content: stretch;
  }

  .chat-welcome-suggestions button {
    width: 100%;
    justify-content: flex-start;
  }

  .chatbot-input-row {
    align-items: stretch;
  }
}


.chat-session[hidden],
.chat-welcome[hidden]{

display:none !important;

}