/* UMA — Treasury AI Assistant bubble */
/* Palette: dark navy bg · silver-gray accent (#c8d0da) · cool slate text */

.uma-bubble-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: inherit;
}

.uma-bubble-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #0d1117;
  border: 2px solid #9aa8b5;
  color: #c8d0da;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.uma-bubble-toggle:hover {
  transform: scale(1.08);
  border-color: #c8d0da;
}

.uma-bubble-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #4a5568;
  color: #e8edf2;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uma-bubble-panel {
  position: absolute;
  bottom: 64px;
  right: 0;
  width: 360px;
  max-height: 520px;
  background: #0d1117;
  border: 1px solid rgba(200,208,218,0.18);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  overflow: hidden;
}

.uma-bubble-header {
  background: #131920;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(200,208,218,0.12);
}

.uma-bubble-title {
  font-weight: 700;
  color: #e8edf2;
  flex: 1;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.uma-bubble-tag {
  background: rgba(200,208,218,0.10);
  color: #9aa8b5;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.uma-bubble-close {
  background: none;
  border: none;
  color: #7a8896;
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.uma-bubble-close:hover { opacity: 1; color: #c8d0da; }

.uma-bubble-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
  max-height: 280px;
}

.uma-bubble-message {
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  max-width: 90%;
}

.uma-bubble-message.assistant,
.uma-bubble-message.uma {
  background: rgba(200,208,218,0.06);
  border: 1px solid rgba(200,208,218,0.14);
  color: #c8d8e8;
  align-self: flex-start;
}

.uma-bubble-message.user {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #c8d0da;
  align-self: flex-end;
}

.uma-bubble-message.system {
  background: rgba(200,208,218,0.05);
  border: 1px solid rgba(200,208,218,0.12);
  color: rgba(200,208,218,0.70);
  align-self: center;
  font-size: 12px;
  text-align: center;
  max-width: 100%;
}

.uma-bubble-input-row {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid rgba(200,208,218,0.10);
}

.uma-bubble-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,208,218,0.22);
  border-radius: 8px;
  color: #e8edf2;
  font-size: 13px;
  padding: 7px 10px;
  resize: none;
  font-family: inherit;
  outline: none;
}

.uma-bubble-input:focus {
  border-color: rgba(200,208,218,0.50);
}

.uma-bubble-input::placeholder {
  color: rgba(200,208,218,0.28);
}

.uma-bubble-send {
  background: #1e2532;
  color: #c8d0da;
  border: 1px solid #9aa8b5;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.uma-bubble-send:hover { background: #2a3547; color: #e8edf2; }
.uma-bubble-send:disabled { opacity: 0.4; cursor: not-allowed; }

.uma-bubble-footer {
  padding: 6px 12px 8px;
  font-size: 11px;
  color: rgba(200,208,218,0.30);
  border-top: 1px solid rgba(200,208,218,0.08);
  text-align: center;
}

@media (max-width: 480px) {
  .uma-bubble-panel {
    width: calc(100vw - 24px);
    right: -12px;
  }
}
