/* Smart Chatbot Styles */
.smart-chatbot-container {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.smart-chatbot-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.smart-chatbot-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.smart-chatbot-container.top-right {
    top: 20px;
    right: 20px;
}

.smart-chatbot-container.top-left {
    top: 20px;
    left: 20px;
}

/* Chat Button */
.smart-chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chatbot-color, #007cba);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.smart-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.smart-chatbot-button .dashicons {
    width: auto;
    height: auto;
    font-size: 24px;
}

/* Chat Window */
.smart-chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}

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

/* Chat Header */
.smart-chatbot-header {
    background: var(--chatbot-color, #007cba);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.smart-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white !important;
}

.smart-chatbot-header p {
    margin: 5px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
    color: white !important;
}

.smart-chatbot-header-actions {
    display: flex;
    gap: 10px;
}

.smart-chatbot-header-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.smart-chatbot-header-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages */
.smart-chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.smart-chatbot-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

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

.smart-chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--chatbot-color, #007cba);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.smart-chatbot-message.user .smart-chatbot-message-avatar {
    background: #6c757d;
}

.smart-chatbot-message-content {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

.smart-chatbot-message.user .smart-chatbot-message-content {
    background: var(--chatbot-color, #007cba);
    color: white;
}

.smart-chatbot-message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 5px;
    text-align: center;
}

/* Chat Input */
.smart-chatbot-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
}

.smart-chatbot-input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.smart-chatbot-input:focus {
    border-color: var(--chatbot-color, #007cba);
}

.smart-chatbot-send-btn {
    background: var(--chatbot-color, #007cba);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.smart-chatbot-send-btn:hover {
    background: #005a87;
}

.smart-chatbot-send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* WhatsApp Button */
.smart-chatbot-whatsapp-btn {
    background: #25d366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.smart-chatbot-whatsapp-btn:hover {
    background: #128c7e;
}

/* Typing Indicator */
.smart-chatbot-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    max-width: 70%;
}

.smart-chatbot-typing-dots {
    display: flex;
    gap: 3px;
}

.smart-chatbot-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite ease-in-out;
}

.smart-chatbot-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.smart-chatbot-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Welcome Message */
.smart-chatbot-welcome {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.smart-chatbot-welcome h4 {
    margin: 0 0 10px 0;
    color: var(--chatbot-color, #007cba);
}

.smart-chatbot-welcome p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

/* Quick Actions */
.smart-chatbot-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.smart-chatbot-quick-btn {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
}

.smart-chatbot-quick-btn:hover {
    background: var(--chatbot-color, #007cba);
    color: white;
    border-color: var(--chatbot-color, #007cba);
}

/* Responsive Design */
@media (max-width: 480px) {
    .smart-chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
    
    .smart-chatbot-container.bottom-right,
    .smart-chatbot-container.bottom-left {
        bottom: 10px;
    }
    
    .smart-chatbot-container.bottom-right {
        right: 10px;
    }
    
    .smart-chatbot-container.bottom-left {
        left: 10px;
    }
}

/* Animation for chat window */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.smart-chatbot-window.active {
    animation: slideIn 0.3s ease-out;
}

/* Loading spinner */
.smart-chatbot-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--chatbot-color, #007cba);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Confirmation Dialog */
.smart-chatbot-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    border-radius: 12px;
}

.smart-chatbot-confirm-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.smart-chatbot-confirm-dialog {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 280px;
    width: 90%;
    margin: 10px;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.smart-chatbot-confirm-header {
    background: var(--chatbot-color, #007cba);
    color: white;
    padding: 15px;
    text-align: center;
}

.smart-chatbot-confirm-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white !important;
}

.smart-chatbot-confirm-content {
    padding: 15px;
    text-align: center;
}

.smart-chatbot-confirm-content p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #333;
}

.smart-chatbot-confirm-note {
    font-size: 12px !important;
    color: #666 !important;
    font-style: italic;
}

.smart-chatbot-confirm-actions {
    display: flex;
    gap: 8px;
    padding: 0 15px 15px 15px;
}

.smart-chatbot-confirm-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.smart-chatbot-confirm-cancel {
    background: #f5f5f5;
    color: #666;
}

.smart-chatbot-confirm-cancel:hover {
    background: #e5e5e5;
    color: #333;
}

.smart-chatbot-confirm-ok {
    background: var(--chatbot-color, #007cba);
    color: white;
}

.smart-chatbot-confirm-ok:hover {
    background: #005a8b;
    transform: translateY(-1px);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Mobile responsive for confirmation dialog */
@media (max-width: 480px) {
    .smart-chatbot-confirm-dialog {
        width: 95%;
        margin: 8px;
        max-width: 260px;
    }
    
    .smart-chatbot-confirm-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .smart-chatbot-confirm-btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .smart-chatbot-send-btn {
        width: 36px;
        height: 36px;
    }
} 