/* Futuristic Glassmorphism Design inspired by 7Digits */

.scb-fab {
  position: fixed;
  right: 100px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 212, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  z-index: 99999;
  font-size: 28px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scb-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0, 212, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scb-fab:active {
  transform: scale(0.95);
}

.scb-panel {
  position: fixed;
  right: 20px;
  bottom: 86px;
  width: 33vw;
  min-width: 280px;
  max-width: 480px;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 212, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  z-index: 99998;
  border: 1px solid rgba(0, 212, 255, 0.2);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .scb-panel {
    width: 80vw;
    left: 10px;
    right: 10px;
    bottom: 86px;
    min-width: 0;
    max-width: none;
    border-radius: 12px;
  }
}

.scb-header {
  padding: 16px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 153, 255, 0.05) 100%);
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  font-weight: 700;
  color: #00d4ff;
  font-size: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.scb-messages {
  padding: 16px;
  overflow: auto;
  flex: 1 1 auto;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(0, 212, 255, 0.02) 100%);
  font-size: 14px;
  color: #e2e8f0;
}

.scb-messages::-webkit-scrollbar {
  width: 6px;
}

.scb-messages::-webkit-scrollbar-track {
  background: rgba(0, 212, 255, 0.05);
  border-radius: 10px;
}

.scb-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 10px;
}

.scb-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

.scb-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(0, 212, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.scb-input {
  flex: 1 1 auto;
  padding: 10px 14px;
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.6);
  color: #e2e8f0;
  font-size: 14px;
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.scb-input:focus {
  outline: none;
  border-color: rgba(0, 212, 255, 0.5);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.2);
}

.scb-input::placeholder {
  color: rgba(226, 232, 240, 0.5);
}

.scb-send {
  background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  color: #000;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.scb-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4);
}

.scb-send:active {
  transform: translateY(0);
}

.scb-msg {
  margin-bottom: 12px;
  white-space: pre-wrap;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.5;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scb-user {
  text-align: right;
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.08);
  border-left: 3px solid #00d4ff;
  margin-left: 20px;
}

.scb-bot {
  text-align: left;
  color: #e2e8f0;
  background: rgba(100, 116, 139, 0.1);
  border-left: 3px solid #0099ff;
  margin-right: 20px;
}

.scb-error {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.1);
  border-left: 3px solid #ff6b6b;
}

.scb-typing {
  color: #00d4ff;
  font-style: italic;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Animated loader dots */
.scb-loader {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.scb-loader span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
  animation: bounce 1.4s infinite ease-in-out both;
}

.scb-loader span:nth-child(1) {
  animation-delay: -0.32s;
}

.scb-loader span:nth-child(2) {
  animation-delay: -0.16s;
}

.scb-loader span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
  }
}

.scb-sources {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 212, 255, 0.15);
  font-size: 12px;
  background: rgba(0, 212, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
}

.scb-sources strong {
  display: block;
  margin-bottom: 8px;
  color: #00d4ff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 11px;
}

.scb-sources ul {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}

.scb-sources li {
  margin-bottom: 8px;
  color: #cbd5e1;
}

.scb-sources a {
  color: #00d4ff;
  text-decoration: none;
  word-break: break-word;
  transition: all 0.2s ease;
}

.scb-sources a:hover {
  color: #0099ff;
  text-decoration: underline;
}

.scb-source-url {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
  word-break: break-all;
}

.scb-source-url a {
  color: #64748b;
  font-size: 10px;
}

/* Markdown styling */
.scb-bot h1,
.scb-bot h2,
.scb-bot h3 {
  margin: 12px 0 8px 0;
  color: #00d4ff;
  font-weight: 700;
}

.scb-bot h1 {
  font-size: 18px;
}

.scb-bot h2 {
  font-size: 16px;
}

.scb-bot h3 {
  font-size: 14px;
}

.scb-bot strong {
  color: #00d4ff;
  font-weight: 700;
}

.scb-bot em {
  color: #cbd5e1;
  font-style: italic;
}

.scb-bot p {
  margin: 8px 0;
  line-height: 1.6;
}

.scb-bot ul {
  margin: 8px 0 8px 16px;
  padding-left: 0;
  list-style-position: inside;
}

.scb-bot li {
  margin-bottom: 4px;
  color: #e2e8f0;
}

.scb-bot code {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.scb-bot .scb-inline-code {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.scb-bot pre {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 6px;
  padding: 12px;
  margin: 8px 0;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
}

.scb-bot pre code {
  background: none;
  color: #00d4ff;
  padding: 0;
  border: none;
  font-size: 12px;
  line-height: 1.4;
}

.scb-bot a {
  color: #00d4ff;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.scb-bot a:hover {
  color: #0099ff;
}
