#kids-chatbot-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

#kids-chatbot-toggle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(76,175,80,.5);
    transition: transform .2s, box-shadow .2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
#kids-chatbot-toggle:hover { transform:scale(1.08); box-shadow:0 6px 28px rgba(76,175,80,.65); }

#kids-chatbot-toggle .chat-icon,
#kids-chatbot-toggle .close-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: #FF5722;
    color: white;
    font-size: 11px; font-weight: 700;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid white;
    font-family: Arial, sans-serif;
}

#kids-chatbot-window {
    position: absolute;
    bottom: 74px; right: 0;
    width: 360px; height: 510px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: kidsSlideUp .25s ease;
}
@keyframes kidsSlideUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:translateY(0)} }

#kids-chatbot-header {
    background: linear-gradient(135deg,#4CAF50,#2E7D32);
    color: white; padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
}
.header-info { display:flex; align-items:center; gap:10px; }
.avatar {
    width:40px; height:40px;
    background:rgba(255,255,255,.2); border-radius:50%;
    display:flex; align-items:center; justify-content:center;
}
.bot-name { font-weight:700; font-size:15px; }
.bot-status { font-size:11px; opacity:.85; color:#A5D6A7; }

#kids-chatbot-close {
    background:rgba(255,255,255,.15); border:none; color:white;
    width:30px; height:30px; border-radius:50%;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition:background .2s; padding:0;
}
#kids-chatbot-close:hover { background:rgba(255,255,255,.3); }

#kids-chatbot-messages {
    flex:1; overflow-y:auto; padding:16px 14px;
    display:flex; flex-direction:column; gap:10px; background:#F9FBF9;
}
#kids-chatbot-messages::-webkit-scrollbar { width:4px; }
#kids-chatbot-messages::-webkit-scrollbar-thumb { background:#C8E6C9; border-radius:4px; }

.message { display:flex; max-width:88%; }
.bot-message { align-self:flex-start; }
.user-message { align-self:flex-end; }
.message-bubble { padding:10px 14px; border-radius:18px; font-size:13.5px; line-height:1.55; word-break:break-word; }
.bot-message .message-bubble { background:#fff; color:#333; border:1px solid #E8F5E9; border-bottom-left-radius:4px; box-shadow:0 1px 4px rgba(0,0,0,.06); }
.user-message .message-bubble { background:linear-gradient(135deg,#4CAF50,#388E3C); color:white; border-bottom-right-radius:4px; }

.typing-dots { display:flex; gap:4px; align-items:center; padding:4px 0; }
.typing-dots span { width:7px; height:7px; background:#4CAF50; border-radius:50%; animation:kidsBounce 1.2s infinite ease-in-out; }
.typing-dots span:nth-child(2){animation-delay:.2s} .typing-dots span:nth-child(3){animation-delay:.4s}
@keyframes kidsBounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }

#kids-chatbot-input-area { display:flex; align-items:center; padding:10px 12px; border-top:1px solid #E8F5E9; gap:8px; background:white; }
#kids-chatbot-input { flex:1; border:1.5px solid #C8E6C9; border-radius:24px; padding:9px 16px; font-size:13.5px; outline:none; color:#333; background:#F9FBF9; transition:border-color .2s; }
#kids-chatbot-input:focus { border-color:#4CAF50; background:white; }
#kids-chatbot-input::placeholder { color:#aaa; }
#kids-chatbot-send { width:40px; height:40px; border-radius:50%; border:none; background:linear-gradient(135deg,#4CAF50,#2E7D32); color:white; cursor:pointer; display:flex; align-items:center; justify-content:center; transition:transform .15s,opacity .15s; flex-shrink:0; padding:0; }
#kids-chatbot-send:hover { transform:scale(1.08); }
#kids-chatbot-send:disabled { opacity:.5; cursor:not-allowed; transform:none; }
#kids-chatbot-footer { text-align:center; font-size:10.5px; color:#aaa; padding:6px; background:white; }

@media(max-width:480px) {
    #kids-chatbot-window { width:calc(100vw - 40px); right:-14px; bottom:70px; height:460px; }
    #kids-chatbot-widget { bottom:18px; right:18px; }
}
