/* ================================
   Chatbot Baye Djily Styles
   ================================ */

/* Chatbot Container */
#chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

/* Chatbot Button */
.chatbot-button {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2C5F2D 0%, #97BC62 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(44, 95, 45, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(44, 95, 45, 0.4);
}

.chatbot-icon {
    width: 30px;
    height: 30px;
    color: white;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background-color: #FFB612;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Chatbot Window */
.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 550px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #2C5F2D 0%, #97BC62 100%);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.chatbot-avatar svg {
    width: 24px;
    height: 24px;
}

.chatbot-header-info {
    flex: 1;
}

.chatbot-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.chatbot-header-info p {
    margin: 2px 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.chatbot-close:hover {
    opacity: 0.8;
}

.chatbot-close svg {
    width: 24px;
    height: 24px;
}

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

.chatbot-message {
    display: flex;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2C5F2D 0%, #97BC62 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
    font-size: 18px;
}

.message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-bubble {
    background: white;
    padding: 10px 14px;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 85%;
}

.message-bubble p {
    margin: 0;
    line-height: 1.5;
    color: #1a1a1a;
}

.message-bubble ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.message-bubble li {
    margin: 4px 0;
    line-height: 1.4;
}

.message-time {
    font-size: 0.75rem;
    color: #999;
    padding-left: 4px;
}

.chatbot-message.user {
    flex-direction: row-reverse;
}

.chatbot-message.user .message-bubble {
    background: linear-gradient(135deg, #2C5F2D 0%, #97BC62 100%);
    color: white;
    margin-left: auto;
}

.chatbot-message.user .message-time {
    text-align: right;
    padding-left: 0;
    padding-right: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    background: white;
    border-radius: 12px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    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);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Quick Actions */
.chatbot-quick-actions {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-action-btn {
    padding: 8px 14px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background: #f5f5f5;
    border-color: #2C5F2D;
    color: #2C5F2D;
}

/* Input Container */
.chatbot-input-container {
    display: flex;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    gap: 8px;
}

.chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input:focus {
    border-color: #2C5F2D;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2C5F2D 0%, #97BC62 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chatbot-send:hover {
    transform: scale(1.05);
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
}

/* WhatsApp Button in Message */
.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 24px;
    font-weight: 500;
    margin-top: 10px;
    transition: background 0.2s;
}

.whatsapp-button:hover {
    background: #20BA5A;
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #97BC62;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #2C5F2D;
}

/* Responsive */
@media (max-width: 768px) {
    #chatbot-container {
        bottom: 15px;
        right: 15px;
    }

    .chatbot-button {
        width: 55px;
        height: 55px;
    }

    .chatbot-window {
        width: calc(100vw - 30px);
        height: calc(100vh - 140px);
        bottom: 75px;
        right: -7px;
    }
}

@media (max-width: 480px) {
    .chatbot-window {
        width: 100vw;
        height: calc(100vh - 100px);
        bottom: 75px;
        right: -20px;
        border-radius: 16px 16px 0 0;
    }
}
