/* Chatbot Styles for Aura Dental Square */

:root {
    --chatbot-primary: #0077b6;
    --chatbot-secondary: #48cae4;
    --chatbot-bg: #ffffff;
    --chatbot-text: #333333;
    --chatbot-border: #e0e0e0;
    --chatbot-user-bg: #e6f3ff;
    --chatbot-bot-bg: #f0f0f0;
    --chatbot-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    --chatbot-transition: all 0.3s ease;
}

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background-color: var(--chatbot-bg);
    border-radius: 15px;
    box-shadow: var(--chatbot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: var(--chatbot-transition);
}

.chatbot-container.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Chatbot Toggle Button - CONSOLIDATED STYLES */
#chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--chatbot-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

#chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    background-color: #005f8b;
}

#chatbot-toggle svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

#chatbot-toggle.open svg {
    transform: rotate(180deg);
}

#chatbot-toggle.open i {
    transform: rotate(180deg);
}

/* Pulse animation for the chatbot icon */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 119, 182, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 119, 182, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 119, 182, 0);
    }
}

/* Add a tooltip to the chatbot icon */
#chatbot-toggle::before {
    content: "Chat with us";
    position: absolute;
    top: -40px;
    right: 0;
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

#chatbot-toggle:hover::before {
    opacity: 1;
}

/* Chatbot Header */
.chatbot-header {
    background-color: var(--chatbot-primary);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.chatbot-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
}

.chatbot-logo {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    border-radius: 50%;
}

.chatbot-close-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: var(--chatbot-transition);
}

.chatbot-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Chatbot Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chatbot-message {
    display: flex;
    margin-bottom: 10px;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message-content {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.chatbot-message.bot .chatbot-message-content {
    background-color: var(--chatbot-bot-bg);
    border-bottom-left-radius: 5px;
}

.chatbot-message.user .chatbot-message-content {
    background-color: var(--chatbot-user-bg);
    color: var(--chatbot-text);
    border-bottom-right-radius: 5px;
}

.chatbot-message-content p {
    margin: 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #0077b6;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    opacity: 0.6;
}

.typing-indicator span:nth-child(1) {
    animation: typing 1s infinite 0s;
}

.typing-indicator span:nth-child(2) {
    animation: typing 1s infinite 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation: typing 1s infinite 0.4s;
    margin-right: 0;
}

@keyframes typing {
    0% {
        transform: translateY(0px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-5px);
        opacity: 1;
    }
    100% {
        transform: translateY(0px);
        opacity: 0.6;
    }
}

/* Chatbot Input Area */
.chatbot-input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid var(--chatbot-border);
    background-color: var(--chatbot-bg);
}

#chatbot-input {
    flex: 1;
    border: 1px solid var(--chatbot-border);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: var(--chatbot-transition);
}

#chatbot-input:focus {
    border-color: var(--chatbot-primary);
    box-shadow: 0 0 0 2px rgba(0, 119, 182, 0.2);
}

#chatbot-send {
    background-color: var(--chatbot-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--chatbot-transition);
}

#chatbot-send:hover {
    background-color: var(--chatbot-secondary);
}

/* Appointment Flow Styling */
.chatbot-message.appointment-step {
    background-color: #e3f2fd;
    border-left: 4px solid #0077b6;
}

.chatbot-message.appointment-step .chatbot-message-content {
    padding: 15px;
}

.chatbot-message.appointment-step h4 {
    margin-top: 0;
    color: #0077b6;
    font-size: 16px;
    margin-bottom: 10px;
}

.chatbot-message.appointment-confirmation {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.chatbot-message.appointment-confirmation .chatbot-message-content {
    padding: 15px;
}

.chatbot-message.appointment-confirmation h4 {
    margin-top: 0;
    color: #2e7d32;
    font-size: 16px;
    margin-bottom: 10px;
}

.appointment-summary {
    background-color: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-family: 'Courier New', monospace;
}

.appointment-summary p {
    margin: 5px 0;
    line-height: 1.4;
}

.appointment-summary strong {
    color: #0077b6;
}

/* Quick Reply Buttons */
.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.quick-reply-btn {
    background-color: #e3f2fd;
    border: 1px solid #0077b6;
    color: #0077b6;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-reply-btn:hover {
    background-color: #0077b6;
    color: white;
}

/* Test Panel Button */
#chatbot-test-panel-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6c757d;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.3s ease;
}

#chatbot-test-panel-toggle:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100% - 40px);
        height: 60vh;
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
    
    #chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    #chatbot-toggle i {
        font-size: 20px;
    }
    
    #chatbot-test-panel-toggle {
        bottom: 80px;
        right: 20px;
    }
}
/* Quick Reply Buttons */
.chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chatbot-quick-reply {
    background-color: var(--chatbot-primary);
    color: white;
    border: none;
    border-radius: 18px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chatbot-quick-reply:hover {
    background-color: var(--chatbot-secondary);
}
