/* Chat Bubble Icon */
#afc-chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #0073aa; /* WordPress blue */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: transform 0.2s ease-in-out;
}

#afc-chat-bubble:hover {
    transform: scale(1.1);
}

#afc-chat-icon svg {
    color: white;
    width: 32px;
    height: 32px;
}

/* Chat Window */
#afc-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    height: 500px;
    max-height: 80vh;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}

/* Chat Header */
.afc-chat-header {
    background-color: #0073aa;
    color: white;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

/* Chat Body & Messages */
.afc-chat-body {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.afc-chat-messages {
    display: flex;
    flex-direction: column;
}

.afc-message {
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 80%;
    line-height: 1.4;
}

.afc-message-bot {
    background-color: #e5e5ea;
    color: #000;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.afc-message-user {
    background-color: #0073aa;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.afc-message-loading {
    align-self: flex-start;
    font-style: italic;
    color: #888;
}

.afc-message ul {
    margin: 5px 0 0 20px;
    padding: 0;
}

.afc-message li {
    margin-bottom: 5px;
}


/* Chat Footer & Form */
.afc-chat-footer {
    padding: 10px;
    border-top: 1px solid #ddd;
}

#afc-email-form {
    display: flex;
}

#afc-email-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
}

#afc-email-form button {
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

#afc-email-form button:hover {
    background-color: #005a87;
}
