/* ── URBAN MBA CHAT WIDGET ── */
#umba-chat-widget * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'DM Sans', sans-serif; }

/* BUBBLE TRIGGER */
#umba-trigger {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 62px; height: 62px;
  background: #e8c84a;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(232,200,74,0.5);
  z-index: 99998;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
#umba-trigger:hover { transform: scale(1.08); box-shadow: 0 6px 32px rgba(232,200,74,0.7); }
#umba-trigger svg { width: 28px; height: 28px; transition: opacity 0.2s; }
#umba-trigger .icon-close { display: none; }
#umba-trigger.open .icon-chat { display: none; }
#umba-trigger.open .icon-close { display: block; }

/* PULSE RING */
#umba-trigger::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(232,200,74,0.4);
  animation: umba-ring 2s ease-out infinite;
}
@keyframes umba-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* CHAT PANEL */
#umba-panel {
  position: fixed;
  bottom: 106px; right: 28px;
  width: 380px;
  height: 560px;
  background: #0a0a0a;
  border-radius: 20px;
  border: 1px solid #2a2a2a;
  box-shadow: 0 12px 60px rgba(0,0,0,0.6);
  z-index: 99997;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
#umba-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

/* PANEL HEADER */
#umba-header {
  background: #111111;
  border-bottom: 1px solid #1e1e1e;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  justify-content: space-between;
}
#umba-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, #e8c84a, #ff6b35, transparent);
}
#umba-header .umba-header-text {
    display: flex;
    column-gap: 10px;
}
.umba-logo-mark {
  width: 38px; height: 38px;
  background: #e8c84a;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.umba-logo-mark span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 10px;
  color: #0a0a0a;
  letter-spacing: 1px;
  font-weight: bold;
}
.umba-header-text h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 17px; letter-spacing: 2px;
  color: #f5f5f0; line-height: 1;
}
.umba-header-text p {
  font-size: 10px; color: #888;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.3px;
}
.umba-status {
  margin-left: auto;
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: #4ade80;
  font-family: 'Space Mono', monospace;
}
.umba-status::before {
  content: '';
  width: 7px; height: 7px;
  background: #4ade80; border-radius: 50%;
  box-shadow: 0 0 6px #4ade80;
  animation: umba-pulse 2s infinite;
}
@keyframes umba-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* QUICK CHIPS DropDown*/
#umba-chips {
  background: #111;
  border-bottom: 1px solid #1e1e1e;
  flex-shrink: 0;
  position: relative;
}
#umba-dropdown-wrap {
  position: relative;
}
#umba-dropdown-btn {
  width: 100%;
  background: #111;
  border: none;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #aaa;
  font-size: 12px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
#umba-dropdown-btn:hover { color: #e8c84a; }
#umba-dropdown-label { flex: 1; text-align: left; }
#umba-dropdown-arrow {
  width: 16px; height: 16px;
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
#umba-dropdown-arrow.open { transform: rotate(180deg); }
#umba-dropdown-menu {
  display: none;
  flex-direction: column;
  background: #0f0f0f;
  border-top: 1px solid #1e1e1e;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}
#umba-dropdown-menu.open { display: flex; }
#umba-dropdown-menu .umba-chip {
  background: none;
  border: none;
  border-bottom: 1px solid #1a1a1a;
  border-radius: 0;
  padding: 10px 16px;
  font-size: 12px;
  color: #ccc;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  white-space: normal;
}
#umba-dropdown-menu .umba-chip:last-child { border-bottom: none; }
#umba-dropdown-menu .umba-chip:hover {
  background: rgba(232,200,74,0.08);
  color: #e8c84a;
}

/* MESSAGES */
#umba-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}
.umba-msg { display: flex; gap: 8px; max-width: 88%; animation: umba-fadeup 0.3s ease; }
@keyframes umba-fadeup { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.umba-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.umba-avatar {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 11px; flex-shrink: 0; margin-top: 2px;
}
.umba-bot-av { background: #e8c84a; color: #0a0a0a; }
.umba-user-av { background: #ff6b35; color: #fff; }
.umba-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px; line-height: 1.6;
}
.umba-bot-bub {
  background: #1a1a2e;
  border: 1px solid #2a2a4a;
  border-top-left-radius: 4px;
  color: #f5f5f0;
  padding: 10px !important;
}
.umba-user-bub {
  background: #1e2a1e;
  border: 1px solid #2a4a2a;
  border-top-right-radius: 4px;
  color: #f5f5f0;
  padding: 10px !important;
}
.umba-bubble strong { color: #e8c84a; }
.umba-bubble a { color: #e8c84a; text-decoration: none; }
.umba-bubble a:hover { text-decoration: underline; }

/* TYPING INDICATOR */
.umba-typing { display: flex; gap: 4px; align-items: center; padding: 2px 0; }
.umba-typing span {
  width: 6px; height: 6px;
  background: #e8c84a;
  border-radius: 50%;
  animation: umba-dot 1.2s infinite;
}
.umba-typing span:nth-child(2) { animation-delay: 0.2s; }
.umba-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes umba-dot { 0%,80%,100%{transform:scale(1);opacity:0.4} 40%{transform:scale(1.3);opacity:1} }

/* INPUT AREA */
#umba-input-area {
  padding: 10px 12px;
  background: #111;
  border-top: 1px solid #1e1e1e;
  display: flex; gap: 8px; align-items: flex-end;
  flex-shrink: 0;
}
.umba-input-wrap {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 8px 12px !important;
  transition: border-color 0.2s;
}
.umba-input-wrap:focus-within { border-color: #e8c84a; }
#umba-text {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: #f5f5f0;
  font-size: 13px;
  resize: none;
  line-height: 1.5;
  max-height: 80px;
  overflow-y: auto;
}
#umba-text::placeholder { color: #555; }
#umba-send {
  width: 38px; height: 38px;
  background: #e8c84a;
  border: none; border-radius: 10px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}
#umba-send:hover { background: #f0d460; transform: scale(1.05); }
#umba-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
#umba-send svg { width: 16px; height: 16px; }

/* FOOTER */
#umba-footer {
  padding: 6px 12px 10px;
  font-size: 10px;
  color: #444;
  text-align: center;
  font-family: 'Space Mono', monospace;
  background: #111;
  flex-shrink: 0;
}
#umba-footer a { color: #666; text-decoration: none; }
#umba-footer a:hover { color: #e8c84a; }

/* MOBILE */
@media (max-width: 480px) {
  #umba-panel { width: calc(100vw - 20px); right: 10px; bottom: 88px; height: 70vh; max-height: 520px; }
  #umba-trigger { bottom: 16px; right: 16px; }
}
