/* Baluchistan AI Chatbot Styles */
.chatbot-container {
    position: fixed;
    right: 20px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    max-height: calc(100vh - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    z-index: 1100;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chatbot-container.minimized {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    top: auto;
    bottom: 20px;
    right: 20px;
    transform: none;
}

.chatbot-header {
    background: linear-gradient(135deg, 
        var(--baluch-blue) 0%, 
        var(--baluch-red) 50%, 
        var(--baluch-green) 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.chatbot-header::before {
    content: '💬';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--baluch-white);
    opacity: 0.85;
}

.chatbot-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    margin-left: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.chatbot-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
    margin-left: 20px;
}

.chatbot-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: var(--transition);
}

.chatbot-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 360px;
}

.chatbot-container.minimized .chatbot-body {
    display: none;
}

.chatbot-container.minimized .chatbot-header {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 60px;
    border-radius: 50%;
}

.chatbot-container.minimized .chatbot-title,
.chatbot-container.minimized .chatbot-subtitle,
.chatbot-container.minimized .chatbot-toggle {
    display: none;
}

.chatbot-container.minimized .chatbot-header::before {
    position: static;
    transform: none;
    font-size: 24px;
    opacity: 1;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    scrollbar-width: thin;
    scrollbar-color: var(--baluch-blue) #e0e0e0;
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--baluch-blue);
    border-radius: 3px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: var(--baluch-blue);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.bot .message-bubble {
    background: white;
    color: var(--text-color);
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.message-time {
    font-size: 11px;
    color: #888;
    margin-top: 5px;
    opacity: 0.7;
}

.chatbot-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chatbot-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.quick-btn {
    background: linear-gradient(45deg, var(--baluch-blue), var(--baluch-green));
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.chatbot-input:focus {
    border-color: var(--baluch-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.chatbot-send {
    background: var(--baluch-blue);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    min-width: 44px;
    height: 44px;
}

.chatbot-send:hover {
    background: var(--baluch-red);
    transform: scale(1.05);
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    border-bottom-left-radius: 5px;
    max-width: 80%;
    margin-bottom: 15px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--baluch-blue);
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-container {
        right: 10px;
        left: auto;
        bottom: 10px;
        top: auto;
        transform: none;
        width: min(92vw, 360px);
        max-height: calc(100vh - 24px);
    }

    .chatbot-container.minimized {
        width: 56px;
        height: 56px;
        right: 12px;
        bottom: 12px;
    }

    .chatbot-container.minimized .chatbot-header::before {
        font-size: 20px;
    }

    .chatbot-body {
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        right: 8px;
        left: auto;
        bottom: 8px;
        top: auto;
        width: min(94vw, 340px);
        max-height: calc(100vh - 16px);
    }

    .chatbot-container.minimized {
        width: 48px;
        height: 48px;
        right: 10px;
        bottom: 10px;
    }

    .chatbot-body {
        min-height: 300px;
    }

    .message-bubble {
        font-size: 13px;
    }
}


/* Animation for opening/closing */
.chatbot-container.opening {
    animation: chatbotOpen 0.3s ease-out forwards;
}

.chatbot-container.closing {
    animation: chatbotClose 0.3s ease-out forwards;
}

@keyframes chatbotOpen {
    from {
        width: 60px;
        height: 60px;
        border-radius: 50%;
    }
    to {
        width: 350px;
        max-height: 600px;
        border-radius: 15px;
    }
}

@keyframes chatbotClose {
    from {
        width: 350px;
        max-height: 600px;
        border-radius: 15px;
    }
    to {
        width: 60px;
        height: 60px;
        border-radius: 50%;
    }
}