﻿#cf-ai-widget {
  font-family: Arial, Helvetica, sans-serif;
  color: #fff;
}

#cf-ai-widget * {
  box-sizing: border-box;
}

#cf-ai-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 2147483000;
  background: #e11d48;
  color: #fff;
  border: 0;
  border-radius: 50px;
  padding: 16px 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(225,29,72,.35);
}

#cf-ai-toggle:hover {
  background: #be123c;
}

#cf-ai-panel {
  position: fixed;
  bottom: 90px;
  right: 22px;
  width: 370px;
  height: 520px;
  max-height: calc(100dvh - 110px);
  z-index: 2147483000;
  background: #101010;
  border: 1px solid #333;
  border-radius: 18px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0,0,0,.65);
}

#cf-ai-panel.cf-ai-open {
  display: flex;
}

.cf-ai-header {
  background: #e11d48;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cf-ai-header strong {
  font-size: 17px;
}

.cf-ai-header small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

#cf-ai-close {
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 25px;
  cursor: pointer;
}

#cf-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cf-ai-message {
  max-width: 90%;
  padding: 12px 14px;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.cf-ai-bot {
  background: #242424;
  align-self: flex-start;
}

.cf-ai-user {
  background: #e11d48;
  align-self: flex-end;
}

.cf-ai-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #333;
}

#cf-ai-input {
  flex: 1;
  min-width: 0;
  padding: 12px;
  background: #202020;
  color: #fff;
  border: 1px solid #444;
  border-radius: 9px;
  font-size: 14px;
}

#cf-ai-send {
  background: #e11d48;
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}

#cf-ai-send:disabled {
  opacity: .55;
  cursor: wait;
}

.cf-ai-footer {
  padding: 9px;
  text-align: center;
  font-size: 12px;
  border-top: 1px solid #252525;
}

.cf-ai-footer a {
  color: #ff6b8b;
  text-decoration: none;
}

@media (max-width: 480px) {
  #cf-ai-panel {
    width: calc(100vw - 24px);
    height: min(560px, calc(100dvh - 100px));
    right: 12px;
    bottom: 82px;
  }

  #cf-ai-toggle {
    right: 12px;
    bottom: 12px;
  }
}
