

#shopping-assistant-root, #shopping-assistant-root * { box-sizing: border-box; }
#shopping-assistant-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: #1f2937;
    text-align: left;
}
#shopping-assistant-root button, #shopping-assistant-root input, #shopping-assistant-root textarea {
    font-family: inherit;
    font-size: inherit;
    letter-spacing: normal;
    text-transform: none;
}
#shopping-assistant-root img { max-width: 100%; }

#shopping-assistant-root { display: block !important; visibility: visible !important; opacity: 1 !important; }
#shopping-assistant-root .assistant-toggle { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; visibility: visible !important; }
.assistant-toggle-icoon { display: none; }
.assistant-toggle {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    padding: 12px 20px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.assistant-toggle:hover { background: #218838; }

.assistant-toggle[aria-expanded="true"] { box-shadow: none; }
@keyframes assistant-attentie { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.assistant-toggle.assistant-toggle--attentie { animation: assistant-attentie 0.8s ease-in-out 4; }
.assistant-panel {
    position: absolute;
    
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 48px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.assistant-header {
    padding: 12px 16px;
    background: #28a745;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.assistant-title { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.assistant-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
#shopping-assistant-root .assistant-toggle .assistant-avatar--toggle { display: inline-block; }
.assistant-header-actions { display: flex; align-items: center; gap: 4px; }
.assistant-clear {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
}
.assistant-clear:hover { background: rgba(255,255,255,0.15); color: #fff; }
.assistant-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.assistant-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}
.assistant-messages:hover { scrollbar-color: rgba(0,0,0,0.28) transparent; }
.assistant-messages::-webkit-scrollbar { width: 6px; }
.assistant-messages::-webkit-scrollbar-track { background: transparent; }
.assistant-messages::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.assistant-messages:hover::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.28); }
.assistant-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; line-height: 1.4; font-size: 14px; }
.assistant-msg.user { align-self: flex-end; background: #e3f2fd; }
.assistant-msg.assistant { align-self: flex-start; background: #f5f5f5; }
.assistant-msg.assistant p { margin: 0 0 6px; }
.assistant-msg.assistant p:last-child { margin-bottom: 0; }
.assistant-msg.assistant ul { margin: 4px 0 6px; padding-left: 18px; }
.assistant-msg.assistant li { margin-bottom: 2px; }
.assistant-msg.assistant strong { font-weight: 700; }
.assistant-msg.assistant em { font-style: italic; }
.assistant-msg.assistant code { background: #e8e8e8; padding: 1px 4px; border-radius: 3px; font-size: 12px; font-family: monospace; }
.assistant-msg.typing { padding: 14px 18px; }
.assistant-typing-dots { display: flex; gap: 4px; align-items: center; }
.assistant-typing-dots span {
    width: 8px; height: 8px; border-radius: 50%; background: #666;
    animation: assistant-typing-bounce 1.4s ease-in-out infinite both;
}
.assistant-typing-dots span:nth-child(1) { animation-delay: 0s; }
.assistant-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.assistant-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes assistant-typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}
.assistant-products-wrap {
    padding: 8px 0 12px;
    margin-left: 0;
    width: 100%;
}
.assistant-products-wrap .assistant-products-label {
    font-size: 11px; font-weight: 600; color: #666; margin-bottom: 8px; text-transform: uppercase;
}
.assistant-products-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.assistant-product-card {
    flex: 0 0 100px;
    text-align: center;
}
.assistant-product-card a { text-decoration: none; color: inherit; display: block; padding: 6px; border: 1px solid #eee; border-radius: 8px; background: #fff; }
.assistant-product-card a:hover { border-color: #28a745; background: #f8fff9; }
.assistant-product-card img { width: 80px; height: 80px; object-fit: contain; border-radius: 6px; display: block; margin: 0 auto; }
.assistant-product-card span { font-size: 12px; display: block; margin-top: 4px; line-height: 1.2; }
.assistant-input-row {
    padding: 12px 16px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}
.assistant-input { flex: 1; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; }
.assistant-send { padding: 10px 16px; background: #28a745; color: #fff; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; }
.assistant-send:hover { background: #218838; }
.assistant-error { padding: 8px 16px; color: #c00; font-size: 13px; }
.assistant-resize-handle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8px;
    cursor: ns-resize;
    background: linear-gradient(to top, rgba(0,0,0,0.08), transparent);
}
.assistant-resize-handle:hover { background: linear-gradient(to top, rgba(0,0,0,0.15), transparent); }
#assistant-column-toggle.active { background: rgba(255,255,255,0.25); color: #fff; }

body.assistant-column-mode { padding-right: 400px !important; box-sizing: border-box; }
body.assistant-column-mode #upodCookieBanner { right: 400px !important; }
body.assistant-column-mode #shopping-assistant-root {
    top: 0;
    bottom: auto;
    left: auto;
    right: 0;
    width: 400px;
    height: 100vh;
    max-height: none;
    z-index: 9999;
}
body.assistant-column-mode .assistant-toggle {
    top: 50%;
    bottom: auto;
    right: 0;
    transform: translateY(-50%);
    border-radius: 12px 0 0 12px;
}
body.assistant-column-mode .assistant-panel {
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
}
body.assistant-column-mode .assistant-resize-handle { display: none; }

@media (max-width: 768px) {
    #shopping-assistant-root {
        top: auto; left: auto; right: 0; bottom: 0;
        width: auto; height: auto; max-width: none; max-height: none;
    }
    #shopping-assistant-root .assistant-toggle {
        position: fixed;
        right: 16px;
        bottom: calc(16px + var(--uv-assist-onder, 0px) + env(safe-area-inset-bottom, 0px));
        width: 56px; height: 56px; padding: 0;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        box-shadow: 0 6px 18px rgba(0,0,0,0.22);
    }
    .assistant-toggle-icoon { display: block; }
    .assistant-toggle-label {
        position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
    }
    #shopping-assistant-root.assistant-open { inset: 0; width: 100%; height: 100%; }
    #shopping-assistant-root .assistant-panel {
        position: fixed;
        inset: 0;
        width: 100%;
        height: var(--uv-assist-hoogte, 100dvh);
        max-width: none; max-height: none;
        border-radius: 0;
        box-shadow: none;
        
        background: #fff !important;
        background-image: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        color: #1f2937 !important;
    }
    #shopping-assistant-root .assistant-messages { background: transparent; }
    #shopping-assistant-root .assistant-header {
        padding-top: calc(12px + env(safe-area-inset-top, 0px));
        flex: 0 0 auto;
    }
    #shopping-assistant-root .assistant-title { font-size: 16px; }
    #shopping-assistant-root .assistant-close { font-size: 30px; padding: 0 8px; }
    #shopping-assistant-root .assistant-messages {
        padding: 14px;
        gap: 10px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    #shopping-assistant-root .assistant-msg { font-size: 15px; max-width: 92%; }
    #shopping-assistant-root .assistant-products-inline {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }
    #shopping-assistant-root .assistant-product-card { scroll-snap-align: start; flex: 0 0 104px; }
    #shopping-assistant-root .assistant-input-row {
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        flex: 0 0 auto;
    }
    
    #shopping-assistant-root .assistant-input { font-size: 16px; padding: 12px; }
    #shopping-assistant-root .assistant-send { font-size: 15px; padding: 12px 16px; }
    #assistant-column-toggle, #shopping-assistant-root .assistant-resize-handle { display: none !important; }
    
    body.assistant-mobiel-open { position: fixed !important; width: 100% !important; overflow: hidden !important; }
    
    body.assistant-mobiel-open upod-widget,
    body.assistant-mobiel-open #upodWidgetOuter { visibility: hidden !important; pointer-events: none !important; }
    body.assistant-column-mode { padding-right: 0 !important; }
    body.assistant-column-mode #upodCookieBanner { right: 0 !important; }
    body.assistant-column-mode #shopping-assistant-root { width: 100%; height: auto; }
    body.assistant-column-mode .assistant-panel { height: 70vh; }
}
#shopping-assistant-root {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: calc(100vw - 24px);
    height: 620px;
    max-height: calc(100vh - 24px);
    
    z-index: 2147483000;
    transition: transform 0.3s ease-out;
    pointer-events: none;
}
#shopping-assistant-root > * { pointer-events: auto; }
#shopping-assistant-root.assistant-slide-out {
    transform: translateX(100%);
}
#shopping-assistant-root.assistant-initial-offscreen {
    transform: translateX(100%);
}
.cart-flyer {
    position: fixed;
    z-index: 10000;
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    pointer-events: none;
}
.cart-flyer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
#header-cart-link.cart-swallow {
    animation: cart-swallow-bounce 0.25s ease-out;
}
@keyframes cart-swallow-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}
