﻿.chat-container {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 500px;
  max-width: 95vw;
  border: 1px solid #888;
  border-radius: 8px;
  overflow: hidden;
  font-family: sans-serif;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  pointer-events: auto;
  visibility: visible;
}

.chat-container-hidden {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
  visibility: hidden;
}

.chat-header {
  background: #0078d4;
  color: #fff;
  /*padding: 10px;*/
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.chat-title {
  font-weight: bold;
}

.chat-body {
  background: #fafafa;
  height: 400px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1rem;
  flex-grow: 1;
}

.chat-message {
  padding: 10px 16px;
  margin: 8px 0;
  max-width: 70%;
  border-radius: 18px;
  position: relative;
  word-break: break-word;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
}

.chat-message.user {
  background: #daf1ff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  border-top-right-radius: 18px;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.chat-message.user::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-top: 8px solid #daf1ff;
  border-right: 8px solid transparent;
}

.chat-message ol {
  list-style: decimal;
}

.chat-message ul {
  list-style: circle;
}

.chat-message.assistant {
  background: #e2e2e2;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border-top-right-radius: 18px;
  border-top-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.chat-message.assistant::after {
  content: "";
  position: absolute;
  left: -8px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-top: 8px solid #e2e2e2;
  border-left: 8px solid transparent;
}

.chat-input-group {
  display: flex;
  border-top: 1px solid #ccc;
  padding: 8px;
  background: #fafafa;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 18px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
  box-shadow: none;
}

.chat-input:focus {
  border-color: #0078d4;
}

.chat-button {
  width: 44px;
  height: 44px;
  border: none;
  background: #0078d4;
  color: #fff;
  font-size: 1.2rem;
  border-radius: 50%;
  margin-left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-button:hover {
  background: #005fa3;
}

/* Paper plane icon for button */
.chat-button .paperplane {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: none;
  vertical-align: middle;
}

.chat-loading {
  text-align: center;
  color: #555;
}

.chat-bubble-closed {
  position: fixed;
  bottom: 100px;
  right: 30px;
  z-index: 1001;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
}

.chat-bubble-message {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  position: absolute;
  right: 70px;
  bottom: 0;
  min-width: 200px;
  max-width: 260px;
  overflow: hidden;
  white-space: normal;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  background: #e2e2e2;
  color: #333;
  border-radius: 18px 18px 4px 18px;
  padding: 8px;
}

.chat-bubble-message ol {
  list-style: decimal;
}

/* Show bubble when icon is hovered or focused */
.chat-bubble-closed .chat-bubble-icon:hover + .chat-bubble-message,
.chat-bubble-closed .chat-bubble-icon:focus + .chat-bubble-message,
.chat-bubble-closed .chat-bubble-message.notification {
  opacity: 1 !important;
  pointer-events: auto;
}

/* Keep bubble visible if it is already visible and hovered */
.chat-bubble-closed .chat-bubble-message:hover {
  opacity: 1 !important;
  pointer-events: auto;
}

.chat-bubble-icon {
  background: #0078d4;
  color: #fff;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18);
  margin-right: 10px;
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: red;
  border-radius: 50%;
  border: 2px solid white;
}

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin: 0 2px;
  background: #888;
  border-radius: 50%;
  animation: wave 1s infinite;
}

.dot1 {
  animation-delay: 0s;
}

.dot2 {
  animation-delay: 0.2s;
}

.dot3 {
  animation-delay: 0.4s;
}

@keyframes wave {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 1;
  }
  30% {
    transform: translateY(-10px);
    opacity: 0.7;
  }
}
/* Responsive styles */
@media (max-width: 600px) {
  .chat-container {
    width: 100vw;
    right: 0;
    left: 0;
    bottom: 0;
    border-radius: 0;
    max-width: 100vw;
  }
  .chat-body {
    height: 50vh;
    max-height: 50vh;
  }
  .chat-message {
    font-size: 0.95rem;
    max-width: 90%;
    padding: 8px 12px;
  }
  .chat-input-group {
    flex-direction: column;
    padding: 6px;
  }
  .chat-button {
    width: 100%;
    -webkit-line-clamp: 3;
    height: 40px;
    margin-left: 0;
    margin-top: 4px;
    border-radius: 18px;
  }
}
.chat-bubble-preview {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.5;
  margin-bottom: 5px;
}

.minimize-button {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  line-height: 1;
}

/*# sourceMappingURL=data:application/json;charset=utf-8,%7B%22version%22:3,%22sourceRoot%22:%22%22,%22sources%22:%5B%22file:///C:/Users/emouselli/Repositories/OpenBusiness/src/OpenBusiness.Blazor/wwwroot/styles/chat.scss%22%5D,%22names%22:%5B%5D,%22mappings%22:%22AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;AACA;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;AACA;AAAA;AAAA;EAGE;EACA;;;AAGF;AACA;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;IACE;IACA;;EAGF;IACE;IACA;;;AAGJ;AACA;EACE;IACE;IACA;IACA;IACA;IACA;IACA;;EAGF;IACE;IACA;;EAGF;IACE;IACA;IACA;;EAGF;IACE;IACA;;EAGF;IACE;IACA;IACA;IACA;IACA;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA%22%7D */