/* FAQ Chatbot Widget Styles */

/* Chatbot Container */
#faq-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Button */
.faq-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.faq-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.faq-chat-button:active {
    transform: scale(0.95);
}

.faq-chat-button svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* Pulse Animation */
.faq-chat-button::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Chat Window */
.faq-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.faq-chat-window.active {
    display: flex;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.faq-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.faq-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 20px;
    line-height: 1;
}

.faq-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Chat Messages */
.faq-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

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

.faq-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.faq-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.faq-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Message Bubbles */
.faq-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
    word-wrap: break-word;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.faq-message.bot {
    align-self: flex-start;
    background: white;
    color: #2d3748;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.faq-message.bot strong {
    color: #667eea;
    display: block;
    margin-bottom: 4px;
}

/* Welcome Message */
.faq-welcome {
    text-align: center;
    color: #718096;
    font-size: 14px;
    padding: 20px;
    margin: auto;
}

.faq-welcome-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* Typing Indicator */
.faq-typing {
    align-self: flex-start;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    display: none;
}

.faq-typing.active {
    display: block;
}

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

.faq-typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e0;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.faq-chat-input {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

.faq-chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.faq-chat-input input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.faq-chat-input button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.faq-chat-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.faq-chat-input button:active {
    transform: scale(0.95);
}

.faq-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.faq-chat-input button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #faq-chatbot-widget {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }

    .faq-chat-window {
        width: 100%;
        height: 500px;
        bottom: 70px;
        right: 0;
        left: 0;
        border-radius: 16px 16px 0 0;
    }

    .faq-chat-button {
        width: 56px;
        height: 56px;
        margin-left: auto;
    }

    .faq-message {
        max-width: 85%;
    }
}

@media (max-width: 360px) {
    .faq-chat-window {
        height: 450px;
    }

    .faq-chat-header {
        padding: 16px;
    }

    .faq-chat-header h3 {
        font-size: 16px;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .faq-chat-window {
        height: 90vh;
    }
}