/* Chatbot Widget Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --dark: #1e293b;
    --light-gray: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

.chatbot-widget {
    position: fixed;
    bottom: 40px;
    right: 47px;
    z-index: 999;
}

.chatbot-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(221, 225, 233, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: visible;
}

.chatbot-icon:hover {
    transform: scale(1.1);
}

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

.chatbot-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    will-change: transform;
}

@keyframes floatIcon {
    0% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0); }
}

.chatbot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 4s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.7;
    }
    70% {
        transform: scale(1);
        opacity: 0;
    }
    100% {
        transform: scale(0.9);
        opacity: 0;
    }
}

.chatbot-tooltip {
    position: absolute;
    bottom: 120px;
    right: 0;
    background: white;
    color: var(--dark);
    padding: 10px 15px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    width: max-content;
    max-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.chatbot-icon:hover + .chatbot-tooltip {
    opacity: 1;
    visibility: visible;
}

.chatbot-panel {
    position: absolute;
    bottom: 120px;
    right: 0;
    width: 350px;
    height: 440px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
}

.chatbot-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chatbot-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

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

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-message .message-avatar {
    background: var(--primary);
    color: white;
}

.user-message .message-avatar {
    background: var(--secondary);
    color: white;
}

.message-content {
    background: var(--light-gray);
    color: var(--dark);
    padding: 12px 15px;
    border-radius: 18px;
}

.message-content * {
    color: inherit;
}

.chatbot-panel .message-content,
.chatbot-panel .message-content p,
.chatbot-panel .message-content span,
.chatbot-panel .message-content div {
    color: #000000 !important;
}

.bot-message .message-content {
    border-top-left-radius: 5px;
    background: #e6f0ff;
}

.user-message .message-content {
    border-top-right-radius: 5px;
    background: #ffedd5;
}

.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    gap: 10px;
}

.chatbot-input-area input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 20px;
    outline: none;
    transition: var(--transition);
}

.chatbot-input-area input:focus {
    border-color: var(--primary);
}

.chatbot-input-area button {
    padding: 10px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.chatbot-input-area button:hover {
    background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chatbot-panel {
        width: 90%;
        right: 5%;
    }
    
    .chatbot-widget {
        right: 20px;
        bottom: 20px;
    }
    
    .chatbot-icon {
        width: 70px;
        height: 70px;
    }
}

/* Voice Button Styles */
.voice-btn {
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.voice-btn:hover {
    background: #d97706;
    transform: scale(1.1);
}

.voice-btn.recording {
    background: #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}
