
:root {
    --c2c-primary: var(--c2c-color, #2563eb);
    --c2c-bg: #ffffff;
    --c2c-text: #1f2937;
    --c2c-gray: #f3f4f6;
}

#c2c-root {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.c2c-btn {
    background: var(--c2c-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s;
}

.c2c-btn:hover {
    transform: scale(1.05);
}

.c2c-hidden {
    display: none !important;
}

#c2c-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--c2c-bg);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: c2c-fade-up 0.3s ease-out;
}

@keyframes c2c-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.c2c-header {
    background: var(--c2c-primary);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.c2c-avatar-circle {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    /* Placeholder for avatar image based on man/woman selection handled in JS */
    background-size: cover;
    background-position: center;
}

.c2c-header-info {
    flex: 1;
}

.c2c-bot-name {
    font-weight: bold;
    font-size: 15px;
}

.c2c-status {
    font-size: 11px;
    opacity: 0.9;
}

#c2c-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

#c2c-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.c2c-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.c2c-msg.bot {
    background: #e5e7eb;
    color: black;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.c2c-msg.user {
    background: var(--c2c-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.c2c-input-area {
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;
    display: flex;
    gap: 10px;
}

#c2c-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#c2c-input:focus {
    border-color: var(--c2c-primary);
}

#c2c-send {
    background: var(--c2c-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.c2c-footer {
    font-size: 10px;
    text-align: center;
    padding: 5px;
    background: #f8f9fa;
    color: #999;
}

.c2c-footer a {
    color: inherit;
    text-decoration: none;
}

/* Lead Form Styling inside Chat */
.c2c-lead-form {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-top: 5px;
}

.c2c-lead-form input {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.c2c-lead-form button {
    width: 100%;
    background: var(--c2c-primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 480px) {
    #c2c-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
