/* Terminal — AI Widget Styles */

/* FAB */
#profFab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #e8b341, #d4941a);
  color: #0b0e11;
  font-size: 22px;
  cursor: pointer;
  z-index: 25;
  box-shadow: 0 4px 16px rgba(232, 179, 65, 0.35);
  transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#profFab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(232, 179, 65, 0.5);
}
#profFab.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

/* Panel — fixed viewport overlay: slides in from the right like the Trade pane,
   never touches the chart container (avoids the chart-lib re-measure shift) */
#profPanel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 380px;
  max-width: 100vw;
  height: 100dvh;
  background: #1E2329;
  border-left: 1px solid #2B3139;
  z-index: 26;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
}
#profPanel.on {
  right: 0;
}

/* Header */
.prof-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1a1f2e;
  border-bottom: 1px solid #1e293b;
  font-size: 13px;
  font-weight: 700;
  color: #e8b341;
  flex-shrink: 0;
}
.prof-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.prof-close:hover {
  color: #eaecef;
}

/* Chat log */
.prof-log {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prof-log::-webkit-scrollbar {
  width: 3px;
}
.prof-log::-webkit-scrollbar-track {
  background: transparent;
}
.prof-log::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 2px;
}

/* Message bubbles */
.prof-msg {
  display: flex;
}
.prof-msg-user {
  justify-content: flex-end;
}
.prof-msg-ai {
  justify-content: flex-start;
}
.prof-bubble {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.55;
  word-break: break-word;
}
.prof-msg-user .prof-bubble {
  background: #e8b341;
  color: #0b0e11;
  border-bottom-right-radius: 3px;
}
.prof-msg-ai .prof-bubble {
  background: #1e293b;
  color: #c8d6e5;
  border-bottom-left-radius: 3px;
}

/* Typing dots */
.prof-typing .prof-bubble {
  padding: 10px 16px;
}
.prof-dot {
  display: inline-block;
  color: #64748b;
  animation: profBlink 1.4s infinite;
  font-size: 8px;
  margin: 0 1px;
}
.prof-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.prof-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes profBlink {
  0%,
  80%,
  100% {
    opacity: 0.3;
  }
  40% {
    opacity: 1;
  }
}

/* Quick chips */
.prof-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 0;
}
.prof-chip {
  background: #1e293b;
  border: 1px solid #2b3139;
  color: #c8d6e5;
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  font-family: inherit;
}
.prof-chip:hover {
  background: #2b3139;
  border-color: #e8b341;
}

/* Input row */
.prof-input-row {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid #1e293b;
  background: #1a1f2e;
  flex-shrink: 0;
}
#profInput {
  flex: 1;
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #eaecef;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: inherit;
  outline: none;
}
#profInput:focus {
  border-color: #e8b341;
}
#profInput::placeholder {
  color: #474d57;
}
#profSend {
  background: #e8b341;
  color: #0b0e11;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}
#profSend:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ask-simba-20261018: the named button ("Ask Simba") for doors with ai_button "text" */
#profFab.prof-fab-text {
  width: auto;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  font: 700 15px/44px system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .02em;
  white-space: nowrap;
}
