/* ========================================
   ISA CHATBOT STYLES
   ======================================== */

/* Chatbot Container */
.isa-chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Chatbot Toggle Button */
.isa-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 188, 212, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.isa-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 188, 212, 0.6);
}

.isa-chat-toggle.active {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.isa-chat-toggle svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.isa-chat-toggle .close-icon {
    display: none;
}

.isa-chat-toggle.active .chat-icon {
    display: none;
}

.isa-chat-toggle.active .close-icon {
    display: block;
}

/* Notification Badge */
.isa-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Chatbot Window */
.isa-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: white;
    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;
}

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

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

/* Chat Header */
.isa-chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.isa-chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.isa-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.isa-chat-header-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

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

.isa-status-indicator {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Chat Messages Container */
.isa-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

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

.isa-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Message Bubble */
.isa-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

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

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

.isa-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.isa-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.isa-message-content {
    max-width: 75%;
}

.isa-message.bot .isa-message-bubble {
    background: white;
    color: #1e293b;
    border-radius: 12px 12px 12px 4px;
}

.isa-message.user .isa-message-bubble {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px 12px 4px 12px;
}

.isa-message-bubble {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.isa-message-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}

/* Typing Indicator */
.isa-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px 12px 12px 4px;
    width: fit-content;
}

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

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

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

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

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

.isa-quick-reply-btn {
    background: white;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.isa-quick-reply-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
}

/* Chat Input */
.isa-chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    align-items: center;
}

.isa-chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.isa-chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.isa-chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.isa-chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.4);
}

.isa-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.isa-chat-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Lead Form */
.isa-lead-form {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 8px;
}

.isa-lead-form h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #1e293b;
}

.isa-form-group {
    margin-bottom: 12px;
}

.isa-form-group label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.isa-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.2s ease;
}

.isa-form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.isa-form-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.isa-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .isa-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 20px;
    }
    
    .isa-chatbot {
        bottom: 15px;
        right: 15px;
    }
}

/* Powered by */
.isa-powered-by {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #94a3b8;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
}

.isa-powered-by a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

