/* ============================================
   Manila Polyclinic - Chatbot Widget Styles
   ============================================ */

.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    z-index: var(--z-fixed);
    transition: all var(--transition-normal);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-toggle svg {
    width: 28px;
    height: 28px;
    color: var(--color-white);
}

.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 500px;
    max-height: calc(100vh - 150px);
    background-color: var(--color-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    z-index: var(--z-modal);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: var(--gradient-primary);
    color: var(--color-white);
    padding: var(--space-4) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-title {
    font-weight: var(--font-weight-bold);
}

.chatbot-status {
    font-size: var(--font-size-sm);
    opacity: 0.8;
}

.chatbot-close {
    margin-left: auto;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--color-white);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.chatbot-close:hover {
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.chatbot-message {
    max-width: 85%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-xl);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

.chatbot-message.bot {
    background-color: var(--color-gray-100);
    color: var(--color-gray-700);
    align-self: flex-start;
    border-bottom-left-radius: var(--radius-sm);
}

.chatbot-message.user {
    background: var(--gradient-primary);
    color: var(--color-white);
    align-self: flex-end;
    border-bottom-right-radius: var(--radius-sm);
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    padding: var(--space-3) var(--space-4);
    background-color: var(--color-gray-100);
    border-radius: var(--radius-xl);
    border-bottom-left-radius: var(--radius-sm);
    align-self: flex-start;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    background-color: var(--color-gray-400);
    border-radius: var(--radius-full);
    animation: typing 1.4s infinite ease-in-out;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }
}

.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--color-gray-200);
}

.chatbot-quick-reply {
    padding: var(--space-2) var(--space-3);
    background-color: var(--color-gray-100);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--color-gray-700);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chatbot-quick-reply:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.chatbot-input-area {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-4);
    border-top: 1px solid var(--color-gray-200);
}

.chatbot-input {
    flex: 1;
    padding: var(--space-3);
    border: 1px solid var(--color-gray-300);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.chatbot-send {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chatbot-send:hover {
    transform: scale(1.05);
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
    color: var(--color-white);
}
