
/* Upgraded Chatbot Styles - responsive, modern UI */
#aicpf-wrapper { position: fixed; z-index: 99999; bottom: 20px; right: 20px; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }

.aicpf-chat-button {
  width: 62px; height: 62px; border-radius: 999px; background: linear-gradient(135deg,#6EE7B7,#3B82F6); border: none; box-shadow: 0 8px 24px rgba(11, 12, 40, 0.2); color: white; cursor: pointer;
  display: inline-grid; place-items: center; transition: transform .18s ease, box-shadow .18s ease;
}
.aicpf-chat-button:active { transform: scale(.98); }
.aicpf-chat-button svg { filter: drop-shadow(0 1px 0 rgba(255,255,255,0.06)); }

#chatbot-popup.aicpf-hidden { display: none; opacity: 0; transform: translateY(12px) scale(.98); transition: none; }
#chatbot-popup.aicpf-open {
  width: 360px; max-width: calc(100vw - 40px); height: 540px; display: flex; flex-direction: column;
  background: #ffffff; border-radius: 14px; box-shadow: 0 18px 50px rgba(11,12,40,0.18); overflow: hidden; margin-bottom: 12px;
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98);} to { opacity: 1; transform: translateY(0) scale(1);} }

.aicpf-header { display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom: 1px solid rgba(15,23,42,0.06); background: linear-gradient(180deg, rgba(59,130,246,0.03), transparent); }
.aicpf-title { font-weight: 600; font-size: 15px; color: #0f172a; }
.aicpf-close { background: transparent; border: none; font-size: 22px; line-height:1; color:#64748b; cursor:pointer; padding:6px; border-radius:8px; }
.aicpf-close:hover { background: rgba(15,23,42,0.04); color:#0f172a; }

.aicpf-messages { flex:1; padding: 14px; overflow-y: auto; display:flex; flex-direction:column; gap:10px; background: linear-gradient(180deg,#fbfbfd,#fff); }

.aicpf-message { max-width: 82%; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.35; box-shadow: 0 6px 18px rgba(11,12,40,0.04); }
.aicpf-message.user { align-self: flex-end; background: linear-gradient(180deg,#3B82F6,#2563EB); color: white; border-bottom-right-radius: 6px; }
.aicpf-message.bot { align-self: flex-start; background: #F8FAFF; color: #0f172a; border-bottom-left-radius: 6px; }

.aicpf-form { display:flex; gap:8px; padding: 12px; border-top:1px solid rgba(15,23,42,0.06); background: #fff; align-items: flex-end; }
.aicpf-input { width:100%; resize:none; min-height:38px; max-height:200px; padding:10px 12px; border-radius:10px; border:1px solid rgba(15,23,42,0.06); font-size:14px; outline:none; }
.aicpf-input:focus { box-shadow: 0 6px 18px rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.4); }

.aicpf-send { background: linear-gradient(135deg,#10B981,#06B6D4); color:white; border:none; padding:10px 14px; border-radius:10px; cursor:pointer; font-weight:600; }
.aicpf-send:active{ transform:translateY(1px); }

/* Small screens */
@media (max-width: 600px){
  #aicpf-wrapper { bottom: 14px; right: 12px; left: 12px; display:flex; justify-content:flex-end; }
  #chatbot-popup.aicpf-open { width: 100%; height: 70vh; border-radius: 12px; max-width: none; }
  .aicpf-chat-button { position: relative; z-index: 100001; }
}
