/* website/support_ai/support.css */

.support-ai-button {
  position: fixed;
  right: 88px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  color: #0f172a;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.3);
  z-index: 1150;
}

.support-ai-popup {
  position: fixed;
  right: 88px;
  bottom: 92px;
  width: min(340px, 88vw);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.4);
  display: none;
  flex-direction: column;
  z-index: 1350;
  overflow: hidden;
}

body.light-mode .support-ai-popup {
  background: rgba(248, 250, 252, 0.95);
  color: #0f172a;
}

.support-ai-popup.is-open {
  display: flex;
}

.support-ai__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.support-ai__close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
}

.support-ai__body {
  padding: 1rem;
  max-height: 260px;
  overflow-y: auto;
}

.support-ai__body ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.support-ai__body li {
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.22);
}

.support-ai__body li.is-user {
  align-self: flex-end;
  background: rgba(34, 197, 94, 0.25);
  color: #0f172a;
}

.support-ai__author {
  font-size: 0.75rem;
  opacity: 0.8;
}

.support-ai__text {
  display: block;
  margin-top: 0.25rem;
  line-height: 1.45;
}

.support-ai__suggestions {
  margin-top: 0.4rem;
  padding-left: 1rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.support-ai__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.support-ai__form input {
  flex: 1;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.5rem 0.7rem;
  background: rgba(15, 23, 42, 0.3);
  color: inherit;
}

.support-ai__form button {
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #22d3ee);
  color: #0f172a;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

/* Panel principal */
.support-ai-console {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(15, 23, 42, 0.4);
  border-radius: 18px;
  padding: 1.5rem;
}

body.light-mode .support-ai-console {
  background: rgba(226, 232, 240, 0.6);
}

.support-ai-console__thread {
  max-height: 420px;
  overflow-y: auto;
}

.support-ai-console__thread ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.support-ai-console__thread li {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.25);
}

.support-ai-console__thread li.is-user {
  align-self: flex-end;
  background: rgba(34, 197, 94, 0.25);
  color: #0f172a;
}

.support-ai-console__form {
  display: flex;
  gap: 0.75rem;
}

.support-ai-console__form input {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 0.6rem 0.75rem;
  background: rgba(15, 23, 42, 0.3);
  color: inherit;
}

.support-ai-console__form button {
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #818cf8, #22d3ee);
  color: #0f172a;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
}

@media (max-width: 640px) {
  .support-ai-button {
    right: 20px;
    bottom: 90px;
  }
  .support-ai-popup {
    right: 20px;
    bottom: 160px;
  }
}
