/* Floating chat widget with modern UI */

#sapsol-chat-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* Floating bubble button */
.sapsol-floating-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg,#0b74de,#0066cc);
  box-shadow: 0 10px 30px rgba(2,6,23,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform 0.2s ease;
}

.sapsol-floating-btn:hover {
  transform: scale(1.1);
}

.sapsol-chat-panel {
  width: 400px;
  max-width: calc(100vw - 40px);
  height: 600px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(2,6,23,0.25);
  overflow: hidden;
  display: none; /* toggled by JS */
  flex-direction: column;
  animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sapsol-header {
  background: linear-gradient(135deg,#0b74de,#0066cc);
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}

.sapsol-header .title {
  flex: 1;
}

.sapsol-messages {
  padding: 12px;
  height: calc(100% - 160px);
  overflow-y: auto;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sapsol-msg {
  max-width: 80%;
  line-height: 1.35;
  padding: 10px 14px;
  border-radius: 12px;
  display: inline-block;
}

.sapsol-msg.user {
  background: #0b74de;
  color: #fff;
  align-self: flex-end;
}

.sapsol-msg.bot {
  background: #fff;
  color: #111;
  border: 1px solid #e6eef9;
  align-self: flex-start;
}

/* Attachments */
.sapsol-attachment {
  border: 1px solid #dbe9fb;
  border-radius: 8px;
  margin: 4px 0;
  padding: 8px;
  display: inline-block;
  cursor: pointer;
  background: #f1f6fb;
}

.sapsol-attachment img {
  max-width: 100%;
  border-radius: 6px;
}

/* Carousel */
.sapsol-carousel {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 6px 0;
}

.sapsol-carousel .sapsol-card {
  min-width: 150px;
  border-radius: 12px;
  border: 1px solid #e6eef9;
  background: #fff;
  flex-shrink: 0;
  padding: 8px;
  cursor: pointer;
  text-align: center;
}

.sapsol-carousel .sapsol-card img {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 4px;
}

/* Suggested replies */
.sapsol-suggested {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.sapsol-suggested button {
  background: #0b74de;
  color: #fff;
  border: none;
  padding: 6px 10px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
}

/* Calendar widget */
.sapsol-calendar {
  margin-top: 8px;
  padding: 6px;
  border: 1px solid #dbe9fb;
  border-radius: 8px;
}

/* Input area */
.sapsol-input-wrap {
  padding: 10px;
  border-top: 1px solid #eef3fb;
  display: flex;
  gap: 8px;
  align-items: center;
}

.sapsol-input {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  border: 1px solid black;
  outline: none;
  min-height: 40px;
}

.sapsol-send-btn {
  background: #0066cc;
  color: #fff;
  border: none;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.sapsol-send-btn:hover {
  background: #0052a3;
  transform: scale(1.05);
}

.sapsol-send-btn:active {
  transform: scale(0.95);
}

.sapsol-send-btn i {
  font-size: 16px;
  line-height: 1;
}

.sapsol-typing {
  font-size: 12px;
  color: #666;
  margin: 6px 0;
}
