/* /Components/ChatWidget.razor.rz.scp.css */
/* --- Chat toggle button --- */
.chat-toggle-btn[b-m2nwg4545z] {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--cgca-primary-blue, #0441f7);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: background 0.2s, transform 0.2s;
}

.chat-toggle-btn:hover[b-m2nwg4545z] {
    background: #0335c7;
    transform: scale(1.05);
}

.chat-toggle-icon[b-m2nwg4545z] {
    font-size: 1.75rem;
    line-height: 1;
}

/* --- Chat panel --- */
.chat-panel[b-m2nwg4545z] {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* --- Header --- */
.chat-header[b-m2nwg4545z] {
    background: var(--cgca-primary-blue, #0441f7);
    color: white;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header-title[b-m2nwg4545z] {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-header-subtitle[b-m2nwg4545z] {
    font-size: 0.75rem;
    opacity: 0.85;
}

.chat-close-btn[b-m2nwg4545z] {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.chat-close-btn:hover[b-m2nwg4545z] {
    opacity: 0.8;
}

/* --- Messages area --- */
.chat-messages[b-m2nwg4545z] {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-height: 200px;
    max-height: 350px;
}

/* --- Chat bubbles --- */
.chat-bubble[b-m2nwg4545z] {
    padding: 0.625rem 0.875rem;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.875rem;
    line-height: 1.45;
    word-wrap: break-word;
}

.chat-bubble.assistant[b-m2nwg4545z] {
    background: #f0f2f5;
    color: #1a1a1a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble.user[b-m2nwg4545z] {
    background: var(--cgca-primary-blue, #0441f7);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-bubble.error[b-m2nwg4545z] {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

/* --- Typing indicator --- */
.chat-bubble.typing[b-m2nwg4545z] {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

.dot[b-m2nwg4545z] {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: bounce-b-m2nwg4545z 1.2s infinite;
}

.dot:nth-child(2)[b-m2nwg4545z] {
    animation-delay: 0.2s;
}

.dot:nth-child(3)[b-m2nwg4545z] {
    animation-delay: 0.4s;
}

@keyframes bounce-b-m2nwg4545z {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* --- Lead capture form --- */
.lead-form p[b-m2nwg4545z] {
    margin: 0 0 0.5rem;
}

.lead-form-fields[b-m2nwg4545z] {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.lead-input[b-m2nwg4545z] {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.8rem;
    outline: none;
}

.lead-input:focus[b-m2nwg4545z] {
    border-color: var(--cgca-primary-blue, #0441f7);
    box-shadow: 0 0 0 2px rgba(4, 65, 247, 0.15);
}

.lead-submit-btn[b-m2nwg4545z] {
    padding: 0.4rem 0.75rem;
    background: var(--cgca-accent-green, #06ce17b0);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 0.25rem;
}

.lead-submit-btn:hover:not(:disabled)[b-m2nwg4545z] {
    opacity: 0.9;
}

.lead-submit-btn:disabled[b-m2nwg4545z] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Input area --- */
.chat-input-area[b-m2nwg4545z] {
    display: flex;
    padding: 0.625rem;
    border-top: 1px solid #e5e7eb;
    gap: 0.5rem;
    flex-shrink: 0;
}

.chat-input[b-m2nwg4545z] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 0.875rem;
    outline: none;
}

.chat-input:focus[b-m2nwg4545z] {
    border-color: var(--cgca-primary-blue, #0441f7);
    box-shadow: 0 0 0 2px rgba(4, 65, 247, 0.15);
}

.chat-send-btn[b-m2nwg4545z] {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--cgca-primary-blue, #0441f7);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled)[b-m2nwg4545z] {
    background: #0335c7;
}

.chat-send-btn:disabled[b-m2nwg4545z] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* --- Mobile responsive --- */
@media (max-width: 576px) {
    .chat-panel[b-m2nwg4545z] {
        width: calc(100vw - 1.5rem);
        right: 0.75rem;
        bottom: 5rem;
        max-height: calc(100vh - 7rem);
    }

    .chat-toggle-btn[b-m2nwg4545z] {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }
}
