/* ===============================
   SecureOneBank Assistant Widget
   Full CSS (ASCII-safe)
   =============================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

/* Floating button */
.sob-floating-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #004aad;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sob-floating-button:hover {
  background: #0063ff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.sob-floating-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

/* Chat panel */
.sob-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 80px;
  width: 340px;
  max-height: 560px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
}

.sob-hidden {
  display: none;
}

/* Header */
.sob-chat-header {
  background: linear-gradient(135deg, #004aad, #001f4d);
  color: #ffffff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sob-avatar-wrapper {
  position: relative;
  width: 46px;
  height: 46px;
}

.sob-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}

.sob-avatar-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(77, 208, 225, 0.0);
  box-shadow: 0 0 0 rgba(77, 208, 225, 0.0);
  pointer-events: none;
}

.sob-avatar-pulse.speaking {
  animation: sobPulse 1.8s ease-out infinite;
}

@keyframes sobPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    border-color: rgba(77, 208, 225, 0.45);
    box-shadow: 0 0 0 0 rgba(77, 208, 225, 0.35);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
    border-color: rgba(77, 208, 225, 0.2);
    box-shadow: 0 0 12px 4px rgba(77, 208, 225, 0.25);
  }
  100% {
    transform: translate(-50%, -50%) scale(0.9);
    border-color: rgba(77, 208, 225, 0.0);
    box-shadow: 0 0 0 0 rgba(77, 208, 225, 0.0);
  }
}

.sob-chat-title {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.sob-chat-subtitle {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.sob-close-button {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
}

/* Chat log */
.sob-chat-log {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  background: #f5f7fb;
}

.sob-message {
  display: flex;
  margin-bottom: 8px;
}

.sob-message-bot {
  justify-content: flex-start;
}

.sob-message-user {
  justify-content: flex-end;
}

.sob-message-bubble {
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.sob-message-bot .sob-message-bubble {
  background: #e3ebff;
  color: #001f4d;
  border-bottom-left-radius: 0;
}

.sob-message-user .sob-message-bubble {
  background: #004aad;
  color: #ffffff;
  border-bottom-right-radius: 0;
}

/* Thinking bubble */
.sob-message-thinking .sob-message-bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sob-typing-dots {
  display: inline-flex;
  gap: 3px;
}

.sob-typing-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #4a4f63;
  opacity: 0.4;
  animation: sobTyping 1s infinite;
}

.sob-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.sob-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes sobTyping {
  0% { transform: translateY(0); opacity: 0.3; }
  50% { transform: translateY(-2px); opacity: 0.8; }
  100% { transform: translateY(0); opacity: 0.3; }
}

/* Input area */
.sob-input-area {
  display: flex;
  align-items: center;
  padding: 8px;
  border-top: 1px solid #dde2f0;
  background: #ffffff;
  gap: 6px;
}

/* ===============================
   Polished Microphone Button
   =============================== */

.sob-mic-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #e8ecf5;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.sob-mic-button:hover {
  background: #d5d9e3;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

.sob-mic-button.listening {
  background: #ff4444;
  box-shadow: 0 0 10px rgba(255,0,0,0.6);
}

.sob-mic-icon {
  width: 18px;
  height: 18px;
}

@keyframes sobMicPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.sob-mic-button.listening .sob-mic-icon {
  animation: sobMicPulse 1s infinite ease-in-out;
}

/* Text input */
.sob-text-input {
  flex: 1;
  border-radius: 16px;
  border: 1px solid #c5cbe0;
  padding: 6px 10px;
  font-size: 13px;
}

.sob-send-button {
  border-radius: 999px;
  border: none;
  background: #004aad;
  color: #ffffff;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}

/* Status bar */
.sob-status-bar {
  font-size: 11px;
  color: #4a4f63;
  padding: 4px 8px 8px;
  background: #f5f7fb;
}
