.book-ai-chatbot {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    font-family: inherit;
}

.book-ai-toggle {
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #391481, #f023ca);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 15px 35px rgba(57, 20, 129, 0.35);
}

.book-ai-window {
    position: absolute;
    right: 0;
    bottom: 84px;
    width: 405px;
    height: 600px;
    display: none;
    flex-direction: column;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(20, 20, 40, 0.24);
    border: 1px solid #eee;
}

.book-ai-window.active {
    display: flex;
}

.book-ai-header {
    padding: 18px;
    background: linear-gradient(135deg, #391481, #f023ca);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.book-ai-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.book-ai-header p {
    margin: 3px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.book-ai-header button {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.book-ai-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #faf8ff;
}

.bot-message,
.user-message {
    display: flex;
    margin-bottom: 12px;
}

.user-message {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 84%;
    padding: 11px 13px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.45;
}

.bot-message .message-bubble {
    background: #fff;
    color: #242036;
    border: 1px solid #eee;
    border-bottom-left-radius: 5px;
}

.user-message .message-bubble {
    background: #391481;
    color: #fff;
    border-bottom-right-radius: 5px;
}

.quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 14px;
}

.quick-actions button {
    border: 1px solid rgba(57, 20, 129, 0.16);
    background: #fff;
    color: #391481;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
}

.chat-book-card {
    display: flex;
    gap: 12px;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(30, 20, 70, 0.05);
}

.chat-book-card img {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    background: #eee;
}

.chat-book-info {
    flex: 1;
    min-width: 0;
}

.chat-book-info h5 {
    margin: 0 0 4px;
    color: #1d1733;
    font-size: 14px;
    line-height: 1.3;
}

.chat-book-info p {
    margin: 0 0 4px;
    color: #716b7d;
    font-size: 12px;
}

.chat-book-price {
    color: #391481;
    font-size: 14px;
    font-weight: 800;
    margin: 6px 0;
}

.chat-book-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chat-book-actions a,
.chat-book-actions button {
    border: none;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
    cursor: pointer;
}

.chat-book-actions .view-btn {
    background: #f3edff;
    color: #391481;
}

.chat-book-actions .cart-btn {
    background: #f023ca;
    color: #fff;
}

.chat-book-actions .cart-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.book-ai-footer {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #fff;
    border-top: 1px solid #eee;
}

.book-ai-footer input {
    flex: 1;
    height: 44px;
    border: 1px solid #e4dff1;
    border-radius: 13px;
    padding: 0 13px;
    outline: none;
    font-size: 14px;
}

.book-ai-footer button {
    border: none;
    background: #391481;
    color: #fff;
    padding: 0 17px;
    border-radius: 13px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 575px) {
    .book-ai-chatbot {
        right: 14px;
        bottom: 14px;
    }

    .book-ai-window {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 86px;
        width: auto;
        height: 74vh;
    }

    .book-ai-toggle {
        width: 56px;
        height: 56px;
    }
}