/* VICI AI Chatbot Styles */

:root {
    --vici-primary-color: #0066cc;
    --vici-secondary-color: #f0f4f8;
    --vici-text-color: #333;
    --vici-border-color: #e1e8ed;
    --vici-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Main Container */
#vici-chatbot-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

#vici-chatbot-container.vici-chatbot-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

#vici-chatbot-container.vici-chatbot-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Chat Button */
.vici-chatbot-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--vici-primary-color);
    border: none;
    cursor: pointer;
    box-shadow: var(--vici-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.vici-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.vici-chatbot-button svg {
    width: 28px;
    height: 28px;
    color: white;
    transition: all 0.3s ease;
}

.vici-chatbot-button .vici-chat-icon {
    display: block;
}

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

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

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

/* Chat Window */
.vici-chatbot-window {
    position: absolute;
    bottom: 80px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: var(--vici-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.vici-chatbot-position-bottom-right .vici-chatbot-window {
    right: 0;
}

.vici-chatbot-position-bottom-left .vici-chatbot-window {
    left: 0;
}

.vici-chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

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

.vici-chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.vici-chatbot-avatar svg {
    width: 22px;
    height: 22px;
}

.vici-chatbot-name {
    font-weight: 600;
    font-size: 16px;
}

.vici-chatbot-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

.vici-status-dot {
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.vici-chatbot-minimize {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.vici-chatbot-minimize:hover {
    background: rgba(255, 255, 255, 0.1);
}

.vici-chatbot-minimize svg {
    width: 20px;
    height: 20px;
}

/* Messages Container */
.vici-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.vici-message {
    margin-bottom: 16px;
    display: flex;
    gap: 8px;
    animation: messageSlide 0.3s ease;
}

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

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

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

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

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

.vici-message-user .vici-message-avatar {
    background: #64748b;
    color: white;
}

.vici-message-avatar svg {
    width: 18px;
    height: 18px;
}

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

.vici-message-bot .vici-message-content {
    background: white;
    color: var(--vici-text-color);
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.vici-message-user .vici-message-content {
    background: var(--vici-primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.vici-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.vici-typing-dot {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

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

/* Input Area */
.vici-chatbot-input-container {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid var(--vici-border-color);
}

.vici-chatbot-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #f1f5f9;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
}

.vici-chatbot-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 14px;
    outline: none;
    color: var(--vici-text-color);
}

.vici-chatbot-input::placeholder {
    color: #94a3b8;
}

.vici-chatbot-send-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--vici-primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.vici-chatbot-send-button:hover {
    background: #0052a3;
    transform: scale(1.05);
}

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

.vici-chatbot-send-button svg {
    width: 18px;
    height: 18px;
    color: white;
}

/* Lead Form */
.vici-chatbot-lead-form {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    padding: 24px;
    overflow-y: auto;
    z-index: 10;
}

.vici-lead-form-header {
    margin-bottom: 24px;
}

.vici-lead-form-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--vici-text-color);
}

.vici-lead-form-header p {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.vici-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.vici-form-group {
    margin-bottom: 16px;
}

.vici-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--vici-text-color);
    margin-bottom: 6px;
}

.vici-form-group input,
.vici-form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--vici-border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.vici-form-group input:focus,
.vici-form-group textarea:focus {
    outline: none;
    border-color: var(--vici-primary-color);
}

.vici-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.vici-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.vici-btn-primary,
.vici-btn-secondary {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.vici-btn-primary {
    background: var(--vici-primary-color);
    color: white;
}

.vici-btn-primary:hover {
    background: #0052a3;
}

.vici-btn-secondary {
    background: transparent;
    color: var(--vici-text-color);
    border: 1px solid var(--vici-border-color);
}

.vici-btn-secondary:hover {
    background: #f8fafc;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #vici-chatbot-container {
        bottom: 0;
        right: 0;
        left: 0;
    }
    
    .vici-chatbot-window {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        bottom: 0;
    }
    
    .vici-chatbot-button {
        position: absolute;
        bottom: 20px;
        right: 20px;
    }
    
    .vici-form-row {
        grid-template-columns: 1fr;
    }
}

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

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

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

.vici-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
