/**
 * Zolaa Chatbot IA — Widget CSS v2.2 (Premium)
 * @author Zolaa
 */

/* =========================================================================
   CSS Custom Properties
   ========================================================================= */
#zolaa-chatbot {
    --zolaa-primary: #4F46E5;
    --zolaa-secondary: #F9FAFB;
    --zolaa-text-bot: #1F2937;
    --zolaa-text-user: #FFFFFF;
    --zolaa-bubble-user: #4F46E5;
    --zolaa-radius: 12px;
    --zolaa-font: Inter, system-ui, sans-serif;
    --zolaa-offset-x: 20px;
    --zolaa-offset-y: 20px;
    --zolaa-trigger-size: 60px;
    --zolaa-width: 520px;
    --zolaa-height: 720px;
    --zolaa-shadow: 0 4px 24px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    --zolaa-shadow-hover: 0 12px 40px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(15, 23, 42, 0.08);
    --zolaa-shadow-window: 0 24px 64px rgba(15, 23, 42, 0.16), 0 8px 24px rgba(15, 23, 42, 0.08);
    --zolaa-border: rgba(15, 23, 42, 0.08);
    font-family: var(--zolaa-font);
    z-index: 2147483000;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================================
   Position
   ========================================================================= */
.zolaa-widget {
    position: fixed;
    z-index: 2147483000;
    width: max-content;
    max-width: calc(100vw - 16px);
}

.zolaa-bottom-right {
    right: var(--zolaa-offset-x);
    bottom: var(--zolaa-offset-y);
}

.zolaa-bottom-left {
    left: var(--zolaa-offset-x);
    bottom: var(--zolaa-offset-y);
}

.zolaa-top-right {
    right: var(--zolaa-offset-x);
    top: var(--zolaa-offset-y);
}

.zolaa-top-left {
    left: var(--zolaa-offset-x);
    top: var(--zolaa-offset-y);
}

/* =========================================================================
   Trigger Button
   ========================================================================= */
.zolaa-trigger {
    min-width: var(--zolaa-trigger-size);
    height: var(--zolaa-trigger-size);
    border-radius: 999px;
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--zolaa-primary) 90%, #ffffff) 0%, var(--zolaa-primary) 58%, color-mix(in srgb, var(--zolaa-primary) 86%, #000000) 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    box-shadow:
        0 6px 18px color-mix(in srgb, var(--zolaa-primary) 30%, transparent),
        0 2px 6px rgba(15, 23, 42, 0.12);
    transition: transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.3s ease, width 0.3s ease;
    position: relative;
    z-index: 2;
    overflow: visible;
    font-family: var(--zolaa-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    isolation: isolate;
}

.zolaa-trigger::after {
    display: none;
}

.zolaa-trigger--icon {
    width: var(--zolaa-trigger-size);
    min-width: var(--zolaa-trigger-size);
    padding: 0;
    border-radius: 50%;
}

.zolaa-trigger--text {
    padding: 0 20px;
    min-width: auto;
}

.zolaa-trigger--icon_text {
    padding: 0 18px 0 13px;
    min-width: auto;
}

.zolaa-trigger:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 10px 26px color-mix(in srgb, var(--zolaa-primary) 34%, transparent),
        0 3px 8px rgba(15, 23, 42, 0.14);
}

.zolaa-trigger:active {
    transform: translateY(0) scale(0.97);
}

.zolaa-trigger:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--zolaa-primary) 35%, #fff);
    outline-offset: 3px;
}

.zolaa-trigger-picto {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.zolaa-trigger-icon-svg {
    display: block;
}

.zolaa-trigger-label {
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zolaa-trigger-close {
    display: none;
    align-items: center;
    justify-content: center;
}

.zolaa-trigger.is-open .zolaa-trigger-picto,
.zolaa-trigger.is-open .zolaa-trigger-label,
.zolaa-trigger.is-open .zolaa-trigger-pulse {
    display: none;
}

.zolaa-trigger.is-open {
    width: var(--zolaa-trigger-size);
    min-width: var(--zolaa-trigger-size);
    padding: 0;
    border-radius: 50%;
}

.zolaa-trigger.is-open .zolaa-trigger-close {
    display: flex;
}

.zolaa-trigger-pulse {
    display: none;
}

@keyframes zolaaTriggerPulse {
    0% { transform: scale(1); opacity: 0.5; }
    70% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1.15); opacity: 0; }
}

/* =========================================================================
   Chat Window
   ========================================================================= */
.zolaa-window {
    position: absolute;
    bottom: calc(var(--zolaa-trigger-size) + 20px);
    width: min(max(var(--zolaa-width), 520px), calc(100vw - 32px));
    height: min(max(var(--zolaa-height), 720px), calc(100vh - var(--zolaa-trigger-size) - var(--zolaa-offset-y) - 40px));
    max-height: calc(100vh - var(--zolaa-trigger-size) - var(--zolaa-offset-y) - 40px);
    background: #fff;
    border-radius: calc(var(--zolaa-radius) + 4px);
    border: 1px solid var(--zolaa-border);
    box-shadow: var(--zolaa-shadow-window);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
    backdrop-filter: blur(12px);
}

.zolaa-window.is-expanded {
    width: min(860px, calc(100vw - 40px));
    height: min(820px, calc(100vh - 40px));
    max-height: calc(100vh - 40px);
    bottom: 0;
}

.zolaa-window.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.zolaa-bottom-right .zolaa-window { right: 0; transform-origin: bottom right; }
.zolaa-bottom-left .zolaa-window { left: 0; transform-origin: bottom left; }
.zolaa-top-right .zolaa-window { right: 0; top: calc(var(--zolaa-trigger-size) + 20px); bottom: auto; transform-origin: top right; }
.zolaa-top-left .zolaa-window { left: 0; top: calc(var(--zolaa-trigger-size) + 20px); bottom: auto; transform-origin: top left; }

.zolaa-bottom-left .zolaa-window.is-visible {
    transform: translateY(0) scale(1);
}

.zolaa-top-right .zolaa-window,
.zolaa-top-left .zolaa-window {
    transform: translateY(-20px) scale(0.96);
}

.zolaa-top-right .zolaa-window.is-visible,
.zolaa-top-left .zolaa-window.is-visible {
    transform: translateY(0) scale(1);
}

/* =========================================================================
   Header
   ========================================================================= */
.zolaa-header {
    background: linear-gradient(135deg, var(--zolaa-primary) 0%, color-mix(in srgb, var(--zolaa-primary) 75%, #1e1b4b) 100%);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.zolaa-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.zolaa-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1;
}

.zolaa-header-avatar,
.zolaa-header-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.zolaa-header-logo {
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255,255,255,0.95);
    padding: 4px;
}

.zolaa-avatar-default {
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    backdrop-filter: blur(4px);
}

.zolaa-header-text {
    min-width: 0;
}

.zolaa-header-name {
    display: block;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.zolaa-header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.zolaa-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
    animation: zolaaStatusPulse 2s ease-in-out infinite;
}

@keyframes zolaaStatusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.zolaa-header-actions button {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 999px;
    opacity: 0.9;
    transition: background 0.2s, opacity 0.2s, transform 0.15s;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.zolaa-header-actions button:hover {
    opacity: 1;
    background: rgba(255,255,255,0.22);
    transform: translateY(-1px);
}

.zolaa-header-actions button:focus-visible {
    outline: 2px solid rgba(255,255,255,0.8);
    outline-offset: 2px;
}

.zolaa-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.zolaa-btn-expand .zolaa-icon-collapse {
    display: none;
}

.zolaa-window.is-expanded .zolaa-btn-expand .zolaa-icon-expand {
    display: none;
}

.zolaa-window.is-expanded .zolaa-btn-expand .zolaa-icon-collapse {
    display: block;
}

/* =========================================================================
   Messages Area
   ========================================================================= */
.zolaa-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--zolaa-secondary);
    min-height: 200px;
    scroll-behavior: smooth;
    overscroll-behavior: contain;
}

.zolaa-messages::-webkit-scrollbar { width: 5px; }
.zolaa-messages::-webkit-scrollbar-track { background: transparent; }
.zolaa-messages::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.15);
    border-radius: 10px;
}

/* Message Bubbles */
.zolaa-msg {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: calc(var(--zolaa-radius) + 2px);
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
    position: relative;
    animation: zolaaFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes zolaaFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.zolaa-msg-bot {
    align-self: flex-start;
    background: #fff;
    color: var(--zolaa-text-bot);
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.zolaa-msg-bot::before {
    content: '';
    position: absolute;
    left: -6px;
    bottom: 10px;
    width: 12px;
    height: 12px;
    background: #fff;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    box-shadow: -1px 1px 0 rgba(15, 23, 42, 0.04);
}

.zolaa-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--zolaa-bubble-user) 0%, color-mix(in srgb, var(--zolaa-bubble-user) 88%, #000) 100%);
    color: var(--zolaa-text-user);
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--zolaa-bubble-user) 35%, transparent);
}

.zolaa-msg-user::before {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 10px;
    width: 12px;
    height: 12px;
    background: var(--zolaa-bubble-user);
    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.zolaa-msg a {
    color: var(--zolaa-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.zolaa-msg-user a {
    color: inherit;
    opacity: 0.95;
}

.zolaa-timestamp {
    text-align: center;
    font-size: 11px;
    color: #9CA3AF;
    margin: 4px 0;
    font-weight: 500;
}

.zolaa-system-notice {
    align-self: center;
    max-width: 88%;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,0.82);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #6B7280;
    font-size: 12px;
    line-height: 1.35;
    text-align: center;
}

.zolaa-history-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zolaa-history-title {
    font-size: 12px;
    font-weight: 800;
    color: #4B5563;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0 2px 4px;
}

.zolaa-history-item {
    width: 100%;
    border: 1px solid var(--zolaa-border);
    background: #fff;
    border-radius: calc(var(--zolaa-radius) + 1px);
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    cursor: pointer;
    font-family: var(--zolaa-font);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.zolaa-history-item:hover,
.zolaa-history-item.is-active {
    border-color: color-mix(in srgb, var(--zolaa-primary) 42%, transparent);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--zolaa-primary) 10%, transparent);
}

.zolaa-history-item:hover {
    transform: translateY(-1px);
}

.zolaa-history-item-title {
    color: #111827;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.zolaa-history-item-date {
    color: #6B7280;
    font-size: 11px;
    line-height: 1.2;
}

/* =========================================================================
   Typing Indicator
   ========================================================================= */
.zolaa-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: #fff;
    border-radius: calc(var(--zolaa-radius) + 2px);
    border-bottom-left-radius: 6px;
    align-self: flex-start;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.zolaa-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--zolaa-primary);
    opacity: 0.4;
    animation: zolaaBounce 1.4s infinite ease-in-out both;
}

.zolaa-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.zolaa-typing-dot:nth-child(2) { animation-delay: -0.16s; }
.zolaa-typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes zolaaBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* =========================================================================
   Product Cards
   ========================================================================= */
.zolaa-products-wrapper {
    width: 100%;
    align-self: flex-start;
}

.zolaa-products {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 0;
    width: 100%;
}

.zolaa-product-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: calc(var(--zolaa-radius) + 2px);
    border: 1px solid var(--zolaa-border);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease;
    animation: zolaaFadeInUp 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.zolaa-product-card:hover {
    border-color: color-mix(in srgb, var(--zolaa-primary) 40%, transparent);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--zolaa-primary) 12%, transparent);
    transform: translateY(-1px);
}

@keyframes zolaaFadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.zolaa-product-card:nth-child(2) { animation-delay: 0.06s; }
.zolaa-product-card:nth-child(3) { animation-delay: 0.12s; }
.zolaa-product-card:nth-child(4) { animation-delay: 0.18s; }

.zolaa-product-img {
    width: 72px;
    min-height: 72px;
    object-fit: cover;
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    display: block;
    flex-shrink: 0;
    border-radius: 0;
}

.zolaa-product-body {
    padding: 10px 12px 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
    gap: 4px;
}

.zolaa-product-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--zolaa-text-bot);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.zolaa-product-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
}

.zolaa-product-stock {
    display: flex;
    align-items: center;
    min-height: 16px;
}

.zolaa-price-current {
    font-size: 14px;
    font-weight: 800;
    color: var(--zolaa-primary);
    letter-spacing: -0.02em;
}

.zolaa-price-old {
    font-size: 11px;
    color: #9CA3AF;
    text-decoration: line-through;
}

.zolaa-price-badge {
    font-size: 9px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.zolaa-stock-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 999px;
    font-weight: 600;
    display: inline-block;
}

.zolaa-stock-in { background: #D1FAE5; color: #065F46; }
.zolaa-stock-low { background: #FEF3C7; color: #92400E; }
.zolaa-stock-out { background: #FEE2E2; color: #991B1B; }

.zolaa-product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.zolaa-product-cta {
    display: inline;
    background: none;
    color: var(--zolaa-primary);
    border: none;
    padding: 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.zolaa-product-cta:hover { opacity: 0.75; text-decoration: underline; }

.zolaa-product-cart-btn {
    display: inline;
    background: none;
    color: #6B7280;
    border: none;
    padding: 0;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    white-space: nowrap;
    margin: 0;
}

.zolaa-product-cart-btn:hover:not(:disabled) {
    color: var(--zolaa-primary);
}

.zolaa-product-cart-btn:disabled {
    color: #9CA3AF;
    cursor: not-allowed;
    opacity: 0.85;
}

.zolaa-product-actions-sep {
    color: #D1D5DB;
    font-size: 10px;
    line-height: 1;
}

.zolaa-see-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 14px;
    margin-top: 4px;
    background: #fff;
    color: var(--zolaa-primary);
    border: 1.5px solid color-mix(in srgb, var(--zolaa-primary) 25%, transparent);
    border-radius: calc(var(--zolaa-radius) - 2px);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    font-family: var(--zolaa-font);
}

.zolaa-see-more:hover {
    background: color-mix(in srgb, var(--zolaa-primary) 8%, #fff);
    border-color: var(--zolaa-primary);
    transform: translateY(-1px);
}

.zolaa-see-more svg {
    transition: transform 0.2s;
}

.zolaa-see-more:hover svg {
    transform: translateY(2px);
}

/* =========================================================================
   Quick Replies
   ========================================================================= */
.zolaa-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 10px;
    background: var(--zolaa-secondary);
}

.zolaa-quick-reply {
    padding: 8px 16px;
    border: 1.5px solid color-mix(in srgb, var(--zolaa-primary) 35%, transparent);
    border-radius: 999px;
    background: #fff;
    color: var(--zolaa-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
    font-family: var(--zolaa-font);
}

.zolaa-quick-reply:hover {
    background: var(--zolaa-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--zolaa-primary) 30%, transparent);
}

.zolaa-quick-reply:focus-visible {
    outline: 2px solid var(--zolaa-primary);
    outline-offset: 2px;
}

/* =========================================================================
   Input Area
   ========================================================================= */
.zolaa-input-area {
    background: #fff;
    border-top: 1px solid var(--zolaa-border);
    flex-shrink: 0;
}

.zolaa-form {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    gap: 10px;
}

.zolaa-input {
    flex: 1;
    border: 1.5px solid #E5E7EB;
    border-radius: 999px;
    padding: 11px 18px;
    font-size: 14px;
    font-family: var(--zolaa-font);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--zolaa-secondary);
}

.zolaa-input:focus {
    border-color: var(--zolaa-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--zolaa-primary) 18%, transparent);
}

.zolaa-input::placeholder {
    color: #9CA3AF;
}

.zolaa-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--zolaa-primary), color-mix(in srgb, var(--zolaa-primary) 85%, #000));
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--zolaa-primary) 35%, transparent);
}

.zolaa-send-btn:hover { opacity: 0.92; transform: scale(1.04); }
.zolaa-send-btn:active { transform: scale(0.94); }
.zolaa-send-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }
.zolaa-send-btn:focus-visible {
    outline: 2px solid var(--zolaa-primary);
    outline-offset: 2px;
}

.zolaa-powered {
    text-align: center;
    font-size: 10px;
    color: #9CA3AF;
    padding: 0 14px 10px;
    letter-spacing: 0.02em;
}

.zolaa-powered strong {
    color: var(--zolaa-primary);
    font-weight: 700;
}

/* =========================================================================
   GDPR Banner
   ========================================================================= */
.zolaa-gdpr {
    position: absolute;
    bottom: calc(var(--zolaa-trigger-size) + 20px);
    width: min(340px, calc(100vw - 32px));
    background: #fff;
    border-radius: calc(var(--zolaa-radius) + 2px);
    border: 1px solid var(--zolaa-border);
    box-shadow: var(--zolaa-shadow-window);
    padding: 18px;
    z-index: 3;
    animation: zolaaSlideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.zolaa-bottom-right .zolaa-gdpr { right: 0; }
.zolaa-bottom-left .zolaa-gdpr { left: 0; }

@keyframes zolaaSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.zolaa-gdpr p {
    font-size: 13px;
    line-height: 1.55;
    color: #374151;
    margin: 0 0 14px;
}

.zolaa-gdpr-actions {
    display: flex;
    gap: 10px;
}

.zolaa-gdpr-accept {
    flex: 1;
    padding: 10px;
    background: var(--zolaa-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--zolaa-font);
    transition: opacity 0.2s;
}

.zolaa-gdpr-accept:hover { opacity: 0.9; }

.zolaa-gdpr-decline {
    flex: 1;
    padding: 10px;
    background: #F3F4F6;
    color: #6B7280;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--zolaa-font);
}

/* =========================================================================
   Satisfaction Rating
   ========================================================================= */
.zolaa-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 0;
}

.zolaa-rating-star {
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.15s;
    color: #D1D5DB;
}

.zolaa-rating-star:hover,
.zolaa-rating-star.active {
    color: #F59E0B;
    transform: scale(1.15);
}

/* =========================================================================
   Skeleton Loading
   ========================================================================= */
.zolaa-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: zolaaShimmer 1.5s infinite;
    border-radius: 6px;
}

@keyframes zolaaShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =========================================================================
   Combinations
   ========================================================================= */
.zolaa-product-combination-wrap {
    margin: 6px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zolaa-product-combination-wrap.is-selected .zolaa-product-combination {
    border-color: var(--zolaa-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--zolaa-primary) 15%, transparent);
    background: color-mix(in srgb, var(--zolaa-primary) 6%, #fff);
}

.zolaa-product-combination-wrap.is-out-of-stock .zolaa-product-combination {
    border-color: #FCA5A5;
    background: #FEF2F2;
}

.zolaa-product-combination-label {
    font-size: 11px;
    font-weight: 700;
    color: #4B5563;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.zolaa-product-combination {
    width: 100%;
    min-height: 38px;
    font-size: 12px;
    padding: 8px 12px;
    border: 1.5px solid #E5E7EB;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-family: var(--zolaa-font);
}

.zolaa-product-combination:focus {
    outline: none;
    border-color: var(--zolaa-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--zolaa-primary) 18%, transparent);
}

.zolaa-product-combination.has-selection {
    font-weight: 600;
}

.zolaa-product-combination option:disabled {
    color: #9CA3AF;
}

.zolaa-product-combination-hint {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    color: #B45309;
}

.zolaa-product-combination-wrap.is-out-of-stock .zolaa-product-combination-hint {
    color: #B91C1C;
}

.zolaa-product-actions .zolaa-product-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--zolaa-primary) 10%, #fff);
    color: var(--zolaa-primary);
    font-size: 11px;
    font-weight: 700;
}

.zolaa-product-actions .zolaa-product-cart-btn:disabled {
    background: #F3F4F6;
}

/* =========================================================================
   Mobile Responsive
   ========================================================================= */
@media (max-width: 767px) {
    .zolaa-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
        z-index: 2147483600;
        transform: translateY(100%);
        transform-origin: bottom center;
        transition: transform 0.34s cubic-bezier(0.22, 0.84, 0.26, 1), opacity 0.24s ease;
        display: flex;
        flex-direction: column;
    }

    .zolaa-bottom-left .zolaa-window,
    .zolaa-bottom-right .zolaa-window,
    .zolaa-top-left .zolaa-window,
    .zolaa-top-right .zolaa-window {
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        transform: translateY(100%);
    }

    .zolaa-window.is-visible,
    .zolaa-bottom-left .zolaa-window.is-visible,
    .zolaa-bottom-right .zolaa-window.is-visible,
    .zolaa-top-left .zolaa-window.is-visible,
    .zolaa-top-right .zolaa-window.is-visible {
        transform: translateY(0);
    }

    /* Hide the floating trigger while the full-screen chat is open (header has its own close) */
    .zolaa-trigger.is-open {
        display: none;
    }

    .zolaa-trigger--icon_text,
    .zolaa-trigger--text {
        max-width: calc(100vw - 32px);
    }

    .zolaa-trigger-label {
        max-width: 150px;
    }

    .zolaa-messages {
        max-height: none;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .zolaa-product-card {
        align-items: flex-start;
    }

    .zolaa-product-body {
        width: 100%;
    }

    .zolaa-product-combination,
    .zolaa-product-cart-btn {
        min-height: 44px;
    }

    .zolaa-product-actions {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 6px;
    }

    .zolaa-product-img {
        height: 80px;
        width: 80px;
    }

    .zolaa-header {
        padding: 14px 16px;
        padding-top: max(14px, env(safe-area-inset-top));
        gap: 10px;
        flex-shrink: 0;
    }

    .zolaa-header-avatar,
    .zolaa-header-logo {
        width: 36px;
        height: 36px;
    }

    .zolaa-header-name {
        font-size: 15px;
    }

    .zolaa-header-status {
        font-size: 11px;
    }

    .zolaa-header-actions {
        gap: 2px;
    }

    .zolaa-header-actions button {
        width: 34px;
        height: 34px;
    }

    /* Expand button is meaningless full-screen */
    .zolaa-header-actions .zolaa-btn-expand {
        display: none;
    }

    .zolaa-window.is-expanded {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        bottom: 0;
    }

    .zolaa-input-area {
        flex-shrink: 0;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

/* =========================================================================
   Reduced Motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
    .zolaa-trigger,
    .zolaa-window,
    .zolaa-msg,
    .zolaa-product-card,
    .zolaa-typing-dot,
    .zolaa-trigger-pulse,
    .zolaa-status-dot {
        animation: none !important;
        transition: none !important;
    }
}
