/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.chatbot-widget.chatbot-position-left {
    left: 20px;
}

.chatbot-widget.chatbot-position-right {
    right: 20px;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: var(--primary-color, #0073aa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
}

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

.chatbot-toggle .chatbot-icon {
    font-size: 28px;
    line-height: 1;
}

.chatbot-container {
    position: absolute;
    bottom: 80px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: var(--secondary-color, #ffffff);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.chatbot-widget.chatbot-position-left {
    left: 20px;
}

.chatbot-widget.chatbot-position-left .chatbot-container {
    left: 0;
}

.chatbot-widget.chatbot-position-right {
    right: 20px;
}

.chatbot-widget.chatbot-position-right .chatbot-container {
    right: 0;
}

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

.chatbot-header {
    background: var(--primary-color, #0073aa);
    color: var(--secondary-color, #ffffff);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.chatbot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.chatbot-header-info {
    flex: 1;
}

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

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

.chatbot-close {
    background: none;
    border: none;
    color: var(--secondary-color, #ffffff);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
}

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

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

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

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

.chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
    line-height: 1.5;
}

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

.chatbot-message.user {
    background: var(--primary-color, #0073aa);
    color: var(--secondary-color, #ffffff);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-message.bot {
    background: #ffffff;
    color: #333;
    align-self: flex-start;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.chatbot-message .timestamp {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 5px;
    display: block;
}

.chatbot-lead-form {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.chatbot-lead-form h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.chatbot-lead-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.chatbot-lead-form input:focus {
    outline: none;
    border-color: var(--primary-color, #0073aa);
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.chatbot-input-container {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.chatbot-input-container form {
    display: flex;
    gap: 10px;
}

.chatbot-input-container #chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
}

.chatbot-input-container #chatbot-input:focus {
    border-color: var(--primary-color, #0073aa);
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.chatbot-send-btn {
    background: var(--primary-color, #0073aa);
    color: var(--secondary-color, #ffffff);
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-send-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.chatbot-send-btn:active {
    transform: translateY(0);
}

.chatbot-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-btn-primary {
    background: var(--primary-color, #0073aa);
    color: var(--secondary-color, #ffffff);
    width: 100%;
}

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

.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 18px;
    max-width: 80px;
    align-self: flex-start;
}

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

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

.chatbot-typing 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;
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 80px);
        bottom: 80px;
        left: 10px !important;
        right: 10px !important;
        border-radius: 16px 16px 0 0;
    }
    
    .chatbot-widget.chatbot-position-left,
    .chatbot-widget.chatbot-position-right {
        left: 10px;
        right: auto;
    }
    
    .chatbot-widget.chatbot-position-left .chatbot-container,
    .chatbot-widget.chatbot-position-right .chatbot-container {
        left: 0 !important;
        right: 0 !important;
    }
}

/* Loading State */
.chatbot-loading {
    opacity: 0.6;
    pointer-events: none;
}

