/* Voice Bot Styles */
#image-financial-bot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bot-launcher {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0B2545 0%, #1a3a5c 100%);
    box-shadow: 0 6px 20px rgba(11, 37, 69, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid #C5A059;
}

.bot-launcher:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(11, 37, 69, 0.5);
}

.bot-launcher svg {
    width: 32px;
    height: 32px;
    fill: #C5A059;
    transition: fill 0.3s ease;
}

.bot-launcher:hover svg {
    fill: #fff;
}

.bot-container {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 420px;
    height: 650px;
    max-width: calc(100vw - 60px);
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(11, 37, 69, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

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

.bot-container.active {
    display: flex;
}

.bot-header {
    background: linear-gradient(135deg, #0B2545 0%, #1a3a5c 100%);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.bot-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #C5A059 0%, #d4af6a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-avatar svg {
    width: 28px;
    height: 28px;
    fill: #0B2545;
}

.bot-info {
    flex: 1;
}

.bot-name {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 5px #10b981;
}

.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    opacity: 1;
}

.close-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

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

.message {
    max-width: 85%;
    padding: 12px 16px;
    line-height: 1.5;
    position: relative;
    font-size: 0.95rem;
}

.message.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    border-radius: 0 15px 15px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #C5A059;
}

.message.user {
    align-self: flex-end;
    background: #0B2545;
    color: white;
    border-radius: 15px 15px 0 15px;
    box-shadow: 0 2px 5px rgba(11, 37, 69, 0.2);
}

.bot-input-area {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    padding: 12px 20px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.text-input:focus {
    border-color: #C5A059;
}

.voice-btn,
.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.voice-btn {
    background: #f1f5f9;
    color: #0B2545;
}

.voice-btn:hover {
    background: #e2e8f0;
}

.voice-btn.listening {
    background: #ef4444;
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.send-btn {
    background: #0B2545;
    color: white;
}

.send-btn:hover {
    background: #1a3a5c;
    transform: translateY(-2px);
}

.voice-btn svg,
.send-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: white;
    border-radius: 0 15px 15px 15px;
    width: fit-content;
    margin-bottom: 15px;
    margin-left: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 3px solid #C5A059;
}

.typing-indicator.active {
    display: flex;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #aaa;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Lead Form */
.lead-form {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
}

.lead-form h4 {
    margin-bottom: 10px;
    color: #0B2545;
    font-size: 0.9rem;
}

.lead-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.lead-form button {
    width: 100%;
    padding: 10px;
    background: #C5A059;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.lead-form button:hover {
    opacity: 0.9;
}

.lead-success {
    text-align: center;
    color: #10b981;
    font-weight: 600;
    padding: 10px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .bot-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .bot-launcher {
        width: 60px;
        height: 60px;
    }

    #image-financial-bot-container {
        bottom: 20px;
        right: 20px;
    }
}