/* ==========================================================================
   QUANTUM SIP SMART Q&A & COMMENTS BOT WIDGET (v0.1)
   100% Offline/Edge Lightweight Glassmorphic Chat Widget
   ========================================================================== */

.qsip-bot-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 25px rgba(14, 165, 233, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.qsip-bot-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.6);
}

.qsip-bot-launcher .launcher-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #10b981;
  border: 2px solid #0b0f19;
  border-radius: 50%;
}

.qsip-bot-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 99998;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.qsip-bot-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* Header */
.qsip-bot-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.qsip-bot-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qsip-bot-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

.qsip-bot-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.2px;
}

.qsip-bot-info span {
  font-size: 11px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 4px;
}

.qsip-bot-info span::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}

.qsip-bot-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.2s;
}

.qsip-bot-close:hover {
  color: #fff;
}

/* Chat Messages */
.qsip-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qsip-bot-messages::-webkit-scrollbar {
  width: 5px;
}
.qsip-bot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.qsip-msg {
  max-width: 85%;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.qsip-msg-bot {
  align-self: flex-start;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.qsip-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, #0284c7, #4f46e5);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.qsip-msg a {
  color: #38bdf8;
  text-decoration: underline;
  font-weight: 600;
}

/* Quick Suggestion Chips */
.qsip-chips-container {
  padding: 10px 16px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(11, 15, 25, 0.5);
}

.qsip-chips-container::-webkit-scrollbar {
  display: none;
}

.qsip-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.qsip-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

/* Input Area */
.qsip-bot-input-area {
  padding: 12px 16px;
  background: rgba(11, 15, 25, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 8px;
  align-items: center;
}

.qsip-bot-input {
  flex: 1;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 9px 12px;
  color: #f8fafc;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.qsip-bot-input:focus {
  border-color: #38bdf8;
}

.qsip-bot-input::placeholder {
  color: #64748b;
}

.qsip-bot-send {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.qsip-bot-send:hover {
  transform: scale(1.05);
}

/* Feedback/Comment Form View */
.qsip-comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 12px;
  border-radius: 12px;
  margin-top: 6px;
}

.qsip-form-input {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  color: #fff;
  font-size: 12.5px;
  outline: none;
  font-family: inherit;
}

.qsip-form-input option {
  background: #0f172a;
  color: #f8fafc;
}

.qsip-form-input:focus {
  border-color: #38bdf8;
}

.qsip-form-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: -4px;
}

.qsip-form-note {
  font-size: 11px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
  line-height: 1.35;
}

.qsip-btn-submit {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.qsip-btn-submit:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}
