/* CAR Chatbot Widget Styles */

.car-chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.car-chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.car-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.car-chatbot-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.car-chatbot-button .close-icon {
    display: none;
}

.car-chatbot-button.active .chat-icon {
    display: none;
}

.car-chatbot-button.active .close-icon {
    display: block;
}

.car-chatbot-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(0, 102, 204, 0.4);
    animation: pulse 2s infinite;
}

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

.car-chatbot-window {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

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

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

.car-chatbot-header {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.car-chatbot-avatar {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.car-chatbot-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.car-chatbot-header-info p {
    margin: 4px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.car-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

.car-chatbot-message.bot {
    align-items: flex-start;
}

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

.car-chatbot-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.car-chatbot-message.bot .car-chatbot-message-avatar {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
}

.car-chatbot-message.user .car-chatbot-message-avatar {
    background: #34a853;
    color: white;
}

.car-chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.car-chatbot-message.bot .car-chatbot-message-content {
    background: white;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.car-chatbot-message.user .car-chatbot-message-content {
    background: #0066cc;
    color: white;
    border-bottom-right-radius: 4px;
}

.car-chatbot-message-content strong {
    font-weight: 600;
}

.car-chatbot-message-content a {
    color: #0066cc;
    text-decoration: underline;
}

.car-chatbot-message.user .car-chatbot-message-content a {
    color: white;
}

.car-chatbot-typing {
    display: none;
    align-items: center;
    gap: 10px;
}

.car-chatbot-typing.active {
    display: flex;
}

.car-chatbot-typing-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.car-chatbot-typing-dots {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 4px;
}

.car-chatbot-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0066cc;
    animation: typing 1.4s infinite;
}

.car-chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.car-chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.car-chatbot-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.car-chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.car-chatbot-input:focus {
    border-color: #0066cc;
}

.car-chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.car-chatbot-send:hover:not(:disabled) {
    transform: scale(1.1);
}

.car-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Quick replies */
.car-chatbot-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.car-chatbot-quick-reply {
    padding: 8px 14px;
    background: white;
    border: 1px solid #0066cc;
    color: #0066cc;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.car-chatbot-quick-reply:hover {
    background: #0066cc;
    color: white;
}

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

.car-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

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

.car-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .car-chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        right: 10px;
        bottom: 80px;
    }

    .car-chatbot-button {
        width: 56px;
        height: 56px;
        bottom: 15px;
        right: 15px;
    }
}
