/* HR Chatbot Floating Widget */
.chatbot-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.5);
}

.chatbot-toggle svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

.chatbot-toggle .chatbot-close-icon {
    display: none;
}

.chatbot-toggle.active .chatbot-open-icon {
    display: none;
}

.chatbot-toggle.active .chatbot-close-icon {
    display: block;
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 400px;
    height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 99998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatbot-slide-up 0.3s ease;
}

.chatbot-window.active {
    display: flex;
}

@keyframes chatbot-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.chatbot-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-header-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.chatbot-header-info h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.chatbot-header-info span {
    font-size: 12px;
    opacity: 0.85;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
}

.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Message Bubbles */
.chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-line;
}

.chatbot-msg.bot {
    background: #fff;
    color: #333;
    align-self: flex-start;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chatbot-msg.user {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-msg.bot strong {
    color: #0d6efd;
}

/* Typing indicator */
.chatbot-typing {
    display: none;
    align-self: flex-start;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
}

.chatbot-typing.active {
    display: flex;
    gap: 4px;
    align-items: center;
}

.chatbot-typing span {
    width: 7px;
    height: 7px;
    background: #adb5bd;
    border-radius: 50%;
    animation: chatbot-bounce 1.4s infinite ease-in-out both;
}

.chatbot-typing span:nth-child(1) { animation-delay: -0.32s; }
.chatbot-typing span:nth-child(2) { animation-delay: -0.16s; }
.chatbot-typing span:nth-child(3) { animation-delay: 0s; }

@keyframes chatbot-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Quick Actions */
.chatbot-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    flex-shrink: 0;
}

.chatbot-quick-btn {
    padding: 5px 12px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: #fff;
    color: #495057;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chatbot-quick-btn:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* Input Area */
.chatbot-input-area {
    display: flex;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e9ecef;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    padding: 8px 16px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    background: #0b5ed7;
}

.chatbot-send-btn svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 10px;
        border-radius: 12px;
    }
}
