/* BurcFal Chatbox styles */

.burcfal-chatbox-wrapper {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.burcfal-chatbox-toggle {
    background: #8e44ad;
    color: #fff;
    padding: 10px 16px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-size: 14px;
    font-weight: 600;
}

.burcfal-chatbox-toggle:hover {
    background: #732d91;
}

.burcfal-chatbox-window {
    position: absolute;
    right: 0;
    bottom: 50px;
    width: 320px;
    max-height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.burcfal-chatbox-window.open {
    display: flex;
}

.burcfal-chatbox-header {
    background: linear-gradient(135deg, #8e44ad, #f39c12);
    padding: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.burcfal-chatbox-title {
    font-weight: 600;
    font-size: 14px;
}

.burcfal-chatbox-close {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.burcfal-chatbox-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #faf6ff;
}

.burcfal-chatbox-messages {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
}

.burcfal-message {
    margin-bottom: 8px;
    display: flex;
}

.burcfal-msg-user {
    justify-content: flex-end;
}

.burcfal-msg-bot {
    justify-content: flex-start;
}

.burcfal-message-inner {
    max-width: 80%;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
}

.burcfal-msg-user .burcfal-message-inner {
    background: #8e44ad;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.burcfal-msg-bot .burcfal-message-inner {
    background: #fff;
    color: #333;
    border-bottom-left-radius: 2px;
    border: 1px solid #ead9ff;
}

.burcfal-chatbox-cta-info {
    padding: 6px 10px;
    font-size: 12px;
    border-top: 1px solid #ead9ff;
    background: #fdfbff;
}

.burcfal-chatbox-cta-info a {
    color: #8e44ad;
    font-weight: 600;
    text-decoration: none;
}

.burcfal-chatbox-input-area {
    border-top: 1px solid #ead9ff;
    padding: 6px;
    display: flex;
    gap: 6px;
    background: #fff;
}

.burcfal-chatbox-input {
    flex: 1;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 13px;
    padding: 6px 8px;
    resize: none;
}

.burcfal-chatbox-send {
    background: #8e44ad;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    cursor: pointer;
}

.burcfal-chatbox-send:hover {
    background: #732d91;
}

/* Typing animation */
.burcfal-typing .burcfal-message-inner {
    display: flex;
    gap: 3px;
}

.burcfal-typing span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8e44ad;
    animation: burcfal-bounce 1s infinite ease-in-out;
}

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

.burcfal-typing span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes burcfal-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Lead form */
.burcfal-chatbox-lead-form {
    border-top: 1px solid #ead9ff;
    padding: 8px;
    background: #faf6ff;
}

.burcfal-chatbox-lead-title {
    font-size: 12px;
    margin-bottom: 6px;
}

.burcfal-chatbox-lead-form input,
.burcfal-chatbox-lead-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 4px;
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 5px 7px;
    font-size: 12px;
}

.burcfal-chatbox-lead-form button {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: #8e44ad;
    color: #fff;
    padding: 6px;
    font-size: 12px;
    cursor: pointer;
}

.burcfal-chatbox-lead-form button:hover {
    background: #732d91;
}

.burcfal-lead-status {
    font-size: 11px;
    margin-top: 4px;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .burcfal-chatbox-window {
        right: 10px;
        bottom: 60px;
        width: 90vw;
        max-height: 70vh;
    }

    .burcfal-chatbox-toggle {
        font-size: 13px;
        padding: 8px 14px;
    }
}
