/* fcc.cc chatbot widget */

#fcc-chat-btn {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  z-index: 9000;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 2px solid var(--border, #2a2a2a);
  background: var(--panel, #111214);
  color: var(--accent, #c7d2fe);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.5);
  transition: background .15s, color .15s;
}
#fcc-chat-btn:hover {
  background: var(--panel-2, #15171a);
  color: var(--accent-2, #e0e7ff);
}

#fcc-chat-panel {
  position: fixed;
  bottom: 8.5rem;
  right: 1.5rem;
  z-index: 9001;
  width: 320px;
  max-width: calc(100vw - 2rem);
  height: 440px;
  max-height: calc(100vh - 7rem);
  display: flex;
  flex-direction: column;
  background: var(--panel, #111214);
  border: 2px solid var(--border, #2a2a2a);
  border-radius: .5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.6);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .15s, transform .15s;
}
#fcc-chat-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#fcc-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem .9rem;
  border-bottom: 1px solid var(--line, #1e1e1e);
  font-size: .85rem;
  font-weight: 700;
  color: var(--accent, #c7d2fe);
  flex-shrink: 0;
}
#fcc-chat-close {
  background: none;
  border: none;
  color: var(--text-dim, #9aa3b2);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 .2rem;
  line-height: 1;
}
#fcc-chat-close:hover { color: var(--text, #f5f6f7); }

#fcc-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: .75rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  scroll-behavior: smooth;
}

.fcc-msg {
  max-width: 88%;
  padding: .5rem .75rem;
  border-radius: .4rem;
  font-size: .88rem;
  line-height: 1.4;
  word-break: break-word;
}
.fcc-msg--bot {
  align-self: flex-start;
  background: var(--panel-2, #15171a);
  color: var(--text, #f5f6f7);
  border: 1px solid var(--border, #2a2a2a);
}
.fcc-msg--user {
  align-self: flex-end;
  background: var(--accent, #c7d2fe);
  color: #0c0d0f;
}
.fcc-msg--typing {
  color: var(--text-dim, #9aa3b2);
  font-style: italic;
}

/* Action link inside a bot message */
.fcc-msg a {
  color: var(--accent, #c7d2fe);
  text-decoration: underline;
  font-weight: 600;
}
.fcc-msg--bot a { color: var(--accent, #c7d2fe); }

/* Music results list */
.fcc-results {
  list-style: none;
  margin: .4rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.fcc-results li a {
  display: block;
  padding: .3rem .5rem;
  background: var(--panel, #111214);
  border: 1px solid var(--border, #2a2a2a);
  border-radius: .3rem;
  font-size: .82rem;
  color: var(--accent, #c7d2fe);
  text-decoration: none;
}
.fcc-results li a:hover {
  background: var(--panel-2, #15171a);
  text-decoration: underline;
}
.fcc-results li small {
  display: block;
  color: var(--text-dim, #9aa3b2);
  font-size: .78rem;
}

#fcc-chat-form {
  display: flex;
  gap: .4rem;
  padding: .6rem;
  border-top: 1px solid var(--line, #1e1e1e);
  flex-shrink: 0;
}
#fcc-chat-input {
  flex: 1;
  background: #1a1c1f;
  color: var(--text, #f5f6f7);
  border: 2px solid var(--border, #2a2a2a);
  border-radius: .3rem;
  padding: .45rem .7rem;
  font-size: .88rem;
  font-family: inherit;
  outline: none;
}
#fcc-chat-input:focus { border-color: var(--accent, #c7d2fe); }
#fcc-chat-submit {
  padding: .45rem .85rem;
  border-radius: .3rem;
  border: 2px solid var(--border, #2a2a2a);
  background: var(--btn-bg, #e5e7eb);
  color: var(--btn-text, #111214);
  font-weight: 700;
  cursor: pointer;
  font-size: .88rem;
  white-space: nowrap;
}
#fcc-chat-submit:hover { background: var(--btn-bg-hover, #f3f4f6); }
#fcc-chat-submit:disabled { opacity: .5; cursor: not-allowed; }
