/* -------------------------------------------------------
   Floating Button
------------------------------------------------------- */
.ai-floating-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: transform .2s ease, box-shadow .2s ease;
    font-size: 28px;
}

.ai-floating-button img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

/* -------------------------------------------------------
   Widget Panel
------------------------------------------------------- */
.ai-widget-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 360px;
    max-height: 80vh;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    font-family: system-ui, sans-serif;
}

.ai-widget-panel--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* -------------------------------------------------------
   Header
------------------------------------------------------- */
.ai-widget-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.ai-widget-header-text h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ai-widget-header-text p {
    margin: 2px 0 0;
    font-size: 13px;
    color: #666;
}

/* -------------------------------------------------------
   Body
------------------------------------------------------- */
.ai-widget-body {
    padding: 12px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

/* CTA boven adviesknop */
.ai-cta-static {
    font-size: 12px;
    color: #666;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

/* -------------------------------------------------------
   Chat Messages
------------------------------------------------------- */
.ai-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

/* -------------------------------------------------------
   Chat Bubbles
------------------------------------------------------- */
.ai-msg-ai,
.ai-msg-user {
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 14px;
    border-radius: 14px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* AI bubble */
.ai-msg-ai {
    align-self: flex-start;
    background: #f2f2f2;
    color: #111;
    margin: 0;
}

/* Reset AI inner spacing */
.ai-msg-ai p,
.ai-msg-ai ul,
.ai-msg-ai li,
.ai-msg-ai h1,
.ai-msg-ai h2,
.ai-msg-ai h3,
.ai-msg-ai h4 {
    margin: 0;
    padding: 0;
}

/* User bubble */
.ai-msg-user {
    align-self: flex-end;
    background: #111;
    color: #fff;
    margin: 0;
}

/* -------------------------------------------------------
   Chat Input
------------------------------------------------------- */
.ai-chat-row {
    display: flex;
    gap: 8px;
}

.ai-chat-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #ddd;
    padding: 8px 12px;
    font-size: 14px;
}

.ai-chat-send {
    border-radius: 999px;
    border: none;
    background: #111;
    color: #fff;
    padding: 0 14px;
    font-size: 14px;
    cursor: pointer;
}

/* -------------------------------------------------------
   Adviesknop
------------------------------------------------------- */
.ai-advies-button {
    border-radius: 999px;
    border: 1px solid #eee;
    background: #fafafa;
    padding: 10px 14px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.ai-advies-button .icon {
    width: 22px;
    height: 22px;
}

.ai-advies-button .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* -------------------------------------------------------
   Flow Options
------------------------------------------------------- */
.ai-options-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ai-option-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.ai-option-back {
    background: #fafafa;
    border-color: #ccc;
    color: #333;
}
