/* /popup/anker-chat.css — стили дока «Спросить Anker AI» для лендинга */

#anker-chat-root {
  --ac-night: #14202C;
  --ac-orange: #FF9459;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  font-family: 'Inter', -apple-system, sans-serif;
}

.ac-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ac-night);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0 22px 0 12px;
  height: 50px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 18px 48px -12px rgba(20, 32, 44, 0.55);
  transition: transform 0.15s, opacity 0.15s, background-color 0.15s;
}
.ac-fab:hover { transform: translateY(-2px); }
.ac-fab-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.ac-fab-logo svg { width: 100%; height: 100%; }

.ac-panel {
  flex-direction: column;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 100px);
  background: var(--ac-night);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  box-shadow: 0 24px 64px -16px rgba(20, 32, 44, 0.65);
  overflow: hidden;
}

.ac-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ac-head-logo {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ac-head-logo svg { width: 100%; height: 100%; }
.ac-head-text { flex: 1; min-width: 0; }
.ac-head-title {
  font-family: 'Inter Display', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
}
.ac-head-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  margin: 2px 0 0;
}
.ac-clear {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  padding: 4px 8px;
}
.ac-clear:hover { color: #fff; }
.ac-close {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.ac-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.ac-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.ac-greeting {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin: 4px 0 6px;
}

.ac-bubble-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.ac-bubble-row.is-user { flex-direction: row-reverse; }
.ac-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
}
.ac-bubble-row.is-user .ac-avatar { background: rgba(255, 255, 255, 0.15); }
.ac-avatar svg { width: 14px; height: 14px; }

.ac-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
}
.ac-bubble-row.is-bot .ac-bubble {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
}
.ac-bubble-row.is-user .ac-bubble {
  background: #fff;
  color: var(--ac-night);
}

.ac-thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.ac-spinner {
  width: 12px;
  height: 12px;
  border: 1.6px solid rgba(255, 255, 255, 0.25);
  border-top-color: var(--ac-orange);
  border-radius: 50%;
  animation: ac-spin 0.7s linear infinite;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

.ac-suggests {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ac-suggest {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.ac-suggest:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ac-error {
  font-size: 12px;
  color: var(--ac-orange);
  margin: 0;
}

.ac-input {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ac-textarea {
  flex: 1;
  resize: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  padding: 8px 12px;
  max-height: 120px;
  min-height: 36px;
}
.ac-textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.ac-textarea:focus { outline: none; border-color: rgba(255, 255, 255, 0.3); }

.ac-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--ac-orange);
  color: var(--ac-night);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.15s;
}
.ac-send:hover:not(:disabled) { opacity: 0.9; }
.ac-send:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

.ac-hint {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  padding: 0 14px 10px;
}

@media (max-width: 600px) {
  #anker-chat-root { right: 12px; bottom: 12px; }
  .ac-panel { width: calc(100vw - 24px); max-height: calc(100vh - 72px); }
}
