/* =============================================================
   ACC Chat Widget — ویجت چت شناور
   ============================================================= */

/* ── Variables ──────────────────────────────────────────── */
:root {
    --cw-primary:   #3b82f6;
    --cw-primary-d: #1d4ed8;
    --cw-bg:        #ffffff;
    --cw-surface:   #f8fafc;
    --cw-border:    #e2e8f0;
    --cw-text:      #1e293b;
    --cw-muted:     #94a3b8;
    --cw-radius:    16px;
    --cw-shadow:    0 20px 60px rgba(0,0,0,.18), 0 4px 20px rgba(0,0,0,.1);
    --cw-z:         99999;
    --cw-w:         360px;
    --cw-h:         520px;
}

/* ── Launcher Button ─────────────────────────────────────── */
#acc-chat-launcher {
    position:       fixed;
    bottom:         24px;
    right:          24px;
    z-index:        var(--cw-z);
    display:        flex !important;
    flex-direction: column;
    align-items:    center;
    gap:            6px;
    cursor:         pointer;
    user-select:    none;
}
#acc-chat-launcher.cw-hidden {
    display: none !important;
}

.cw-launcher-btn {
    width:           56px;
    height:          56px;
    border-radius:   50%;
    background:      linear-gradient(135deg, var(--cw-primary), #6366f1);
    color:           #fff;
    font-size:       26px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    box-shadow:      0 4px 20px rgba(59,130,246,.45);
    transition:      transform .2s, box-shadow .2s;
    animation:       cwPulseRing 3s infinite;
}
#acc-chat-launcher:hover .cw-launcher-btn {
    transform:  scale(1.1);
    box-shadow: 0 6px 28px rgba(59,130,246,.6);
}

@keyframes cwPulseRing {
    0%,70%,100% { box-shadow: 0 4px 20px rgba(59,130,246,.45); }
    35% { box-shadow: 0 4px 20px rgba(59,130,246,.45), 0 0 0 10px rgba(59,130,246,.12); }
}

.cw-launcher-label {
    font-size:        11px;
    background:       rgba(30,41,59,.8);
    color:            #fff;
    padding:          3px 8px;
    border-radius:    10px;
    white-space:      nowrap;
    backdrop-filter:  blur(6px);
    font-family:      Tahoma, sans-serif;
}

/* ── Badge ───────────────────────────────────────────────── */
.cw-badge {
    position:        absolute;
    top:             -4px;
    left:            -4px;
    min-width:       18px;
    height:          18px;
    background:      #ef4444;
    color:           #fff;
    font-size:       10px;
    font-weight:     700;
    border-radius:   9px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         0 4px;
    opacity:         0;
    transform:       scale(.5);
    transition:      opacity .2s, transform .2s;
    border:          2px solid #fff;
    font-family:     monospace;
}
.cw-badge.show { opacity:1; transform:scale(1); }

/* ── Chat Window ─────────────────────────────────────────── */
#acc-chat-window {
    position:       fixed;
    bottom:         96px;
    right:          24px;
    z-index:        var(--cw-z);
    width:          var(--cw-w);
    height:         var(--cw-h);
    background:     var(--cw-bg);
    border-radius:  var(--cw-radius);
    box-shadow:     var(--cw-shadow);
    display:        flex;
    flex-direction: column;
    overflow:       hidden;
    opacity:        0;
    transform:      scale(.9) translateY(20px);
    pointer-events: none;
    transition:     opacity .25s cubic-bezier(.4,0,.2,1),
                    transform .25s cubic-bezier(.4,0,.2,1);
    font-family:    Tahoma, 'Vazir', 'IRANSans', sans-serif;
    direction:      rtl;
    font-size:      13px;
    color:          var(--cw-text);
}
#acc-chat-window.open {
    opacity:        1;
    transform:      scale(1) translateY(0);
    pointer-events: auto;
}

/* ── Header ──────────────────────────────────────────────── */
.cw-header {
    background:  linear-gradient(135deg, var(--cw-primary), #6366f1);
    color:       #fff;
    padding:     14px 14px 12px;
    display:     flex;
    align-items: center;
    gap:         10px;
    flex-shrink: 0;
}
.cw-header-avatar {
    width:           40px;
    height:          40px;
    background:      rgba(255,255,255,.2);
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       20px;
    flex-shrink:     0;
}
.cw-header-info { flex:1; min-width:0; }
.cw-header-name { font-size:14px; font-weight:700; }
.cw-header-status {
    font-size:   11px;
    opacity:     .85;
    display:     flex;
    align-items: center;
    gap:         5px;
    margin-top:  2px;
}
.cw-status-dot {
    width:        7px;
    height:       7px;
    background:   #4ade80;
    border-radius:50%;
    animation:    cwDotPulse 2s infinite;
}
@keyframes cwDotPulse { 0%,100%{opacity:1} 50%{opacity:.4} }

.cw-header-close {
    background:      rgba(255,255,255,.2);
    border:          none;
    border-radius:   50%;
    width:           28px;
    height:          28px;
    color:           #fff;
    font-size:       14px;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    transition:      background .15s;
    flex-shrink:     0;
}
.cw-header-close:hover { background:rgba(255,255,255,.35); }

/* ── Loading Bar ─────────────────────────────────────────── */
.cw-loading-bar {
    height:      3px;
    background:  transparent;
    flex-shrink: 0;
    overflow:    hidden;
}
.cw-loading-bar.active {
    background: linear-gradient(90deg,transparent,var(--cw-primary),transparent);
    background-size: 200%;
    animation:  cwLoad .8s linear infinite;
}
@keyframes cwLoad { from{background-position:-200%} to{background-position:200%} }

/* ── Tabs ────────────────────────────────────────────────── */
.cw-tabs {
    display:       flex;
    border-bottom: 1px solid var(--cw-border);
    background:    var(--cw-bg);
    flex-shrink:   0;
}
.cw-tab {
    flex:           1;
    border:         none;
    background:     transparent;
    padding:        9px 4px 8px;
    font-size:      11px;
    font-weight:    600;
    color:          var(--cw-muted);
    cursor:         pointer;
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            3px;
    border-bottom:  2px solid transparent;
    transition:     color .15s, border-color .15s;
    font-family:    inherit;
}
.cw-tab:hover  { color: var(--cw-primary); }
.cw-tab.active { color: var(--cw-primary); border-bottom-color: var(--cw-primary); }
.cw-tab-icon { font-size:16px; }

/* ── Panels ──────────────────────────────────────────────── */
.cw-panel {
    display:        none;
    flex:           1;
    flex-direction: column;
    overflow:       hidden;
    min-height:     0;
}
.cw-panel.active { display:flex; }
#cw-panel-services .cw-home,
#cw-panel-services .cw-wizard { flex: 1; overflow-y: auto; min-height: 0; }

/* ── Home Panel ──────────────────────────────────────────── */
.cw-home {
    padding:        16px;
    overflow-y:     auto;
    flex:           1;
    display:        flex;
    flex-direction: column;
    gap:            14px;
}
.cw-welcome-card {
    background:    linear-gradient(135deg,#eff6ff,#f0f9ff);
    border:        1px solid #bfdbfe;
    border-radius: 12px;
    padding:       18px 14px;
    text-align:    center;
}
.cw-welcome-icon  { font-size:32px; margin-bottom:8px; }
.cw-welcome-title { font-size:15px; font-weight:700; color:var(--cw-text); }
.cw-welcome-sub   { font-size:12px; color:var(--cw-muted); margin-top:5px; line-height:1.6; }

.cw-quick-actions {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   8px;
}
.cw-qa-btn {
    background:      var(--cw-surface);
    border:          1px solid var(--cw-border);
    border-radius:   10px;
    padding:         10px 8px;
    cursor:          pointer;
    display:         flex;
    flex-direction:  column;
    align-items:     center;
    gap:             5px;
    font-size:       11px;
    font-weight:     600;
    color:           var(--cw-text);
    text-decoration: none;
    transition:      background .12s, border-color .12s;
    text-align:      center;
}
.cw-qa-btn:hover { background:#eff6ff; border-color:var(--cw-primary); color:var(--cw-primary); }
.cw-qa-icon { font-size:20px; }

/* ── Chat Panel ──────────────────────────────────────────── */
.cw-visitor-form {
    padding:        16px;
    display:        flex;
    flex-direction: column;
    gap:            10px;
    border-bottom:  1px solid var(--cw-border);
    flex-shrink:    0;
    background:     var(--cw-bg);
}
.cw-visitor-form h4 {
    margin:      0;
    font-size:   12px;
    color:       var(--cw-text);
    font-weight: 600;
}
.cw-visitor-input {
    border:        1px solid var(--cw-border);
    border-radius: 8px;
    padding:       8px 12px;
    font-size:     12px;
    font-family:   inherit;
    outline:       none;
    direction:     rtl;
    transition:    border-color .15s;
    width:         100%;
    box-sizing:    border-box;
}
.cw-visitor-input:focus { border-color: var(--cw-primary); }

.cw-start-btn {
    background:    linear-gradient(135deg, var(--cw-primary), #6366f1);
    color:         #fff;
    border:        none;
    border-radius: 8px;
    padding:       9px 0;
    font-size:     13px;
    font-weight:   700;
    cursor:        pointer;
    font-family:   inherit;
    width:         100%;
    transition:    opacity .15s;
}
.cw-start-btn:hover { opacity:.88; }

/* ── Chat Area (Messages) ────────────────────────────────── */
.cw-chat-area {
    flex:           1;
    overflow-y:     auto;
    padding:        12px 12px 6px;
    display:        flex;
    flex-direction: column;
    gap:            8px;
    background:     var(--cw-surface);
}
.cw-msg {
    display:    flex;
    align-items:flex-end;
    gap:        6px;
    animation:  cwMsgIn .2s ease;
}
@keyframes cwMsgIn { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

.cw-msg--out    { flex-direction:row-reverse; }
.cw-msg--in     { flex-direction:row; }
.cw-msg--system { justify-content:center; }

.cw-msg-avatar {
    width:           28px;
    height:          28px;
    background:      linear-gradient(135deg, var(--cw-primary), #6366f1);
    border-radius:   50%;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       14px;
    flex-shrink:     0;
}
.cw-msg-bubble {
    max-width:     68%;
    padding:       8px 12px;
    border-radius: 14px;
    font-size:     12px;
    line-height:   1.6;
    word-break:    break-word;
}
.cw-msg--out .cw-msg-bubble  { background:var(--cw-primary); color:#fff; border-bottom-right-radius:3px; }
.cw-msg--in  .cw-msg-bubble  { background:#fff; border:1px solid var(--cw-border); color:var(--cw-text); border-bottom-left-radius:3px; }
.cw-msg--system .cw-msg-bubble {
    background: transparent;
    border:     none;
    color:      var(--cw-muted);
    font-size:  11px;
    text-align: center;
    padding:    4px 8px;
}
.cw-msg-time {
    display:    block;
    font-size:  10px;
    opacity:    .65;
    margin-top: 3px;
    text-align: left;
}

/* ── Input Area ──────────────────────────────────────────── */
.cw-input-area {
    padding:     8px 10px;
    border-top:  1px solid var(--cw-border);
    display:     flex;
    gap:         6px;
    align-items: flex-end;
    background:  var(--cw-bg);
    flex-shrink: 0;
}
.cw-input {
    flex:          1;
    border:        1px solid var(--cw-border);
    border-radius: 10px;
    padding:       7px 11px;
    font-size:     12px;
    font-family:   inherit;
    resize:        none;
    outline:       none;
    direction:     rtl;
    transition:    border-color .15s;
    max-height:    80px;
    overflow-y:    auto;
}
.cw-input:focus { border-color: var(--cw-primary); }
.cw-send-btn {
    background:      var(--cw-primary);
    color:           #fff;
    border:          none;
    border-radius:   8px;
    width:           36px;
    height:          36px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       16px;
    cursor:          pointer;
    flex-shrink:     0;
    transition:      background .15s;
}
.cw-send-btn:hover { background: var(--cw-primary-d); }

/* ── Contact Panel ───────────────────────────────────────── */
.cw-contact {
    padding:    16px;
    overflow-y: auto;
    flex:       1;
}
.cw-contact-title {
    font-size:     14px;
    font-weight:   700;
    margin-bottom: 14px;
    color:         var(--cw-text);
}
.cw-contact-list { display:flex; flex-direction:column; gap:10px; }
.cw-contact-item {
    display:         flex;
    align-items:     center;
    gap:             12px;
    padding:         12px 14px;
    background:      var(--cw-surface);
    border:          1px solid var(--cw-border);
    border-radius:   10px;
    text-decoration: none;
    color:           var(--cw-text);
    font-size:       13px;
    transition:      background .12s;
}
.cw-contact-item:hover { background:#eff6ff; border-color:var(--cw-primary); }
.cw-contact-icon {
    width:           40px;
    height:          40px;
    border-radius:   10px;
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       20px;
    flex-shrink:     0;
}
.cw-contact-label { font-size:11px; color:var(--cw-muted); margin-top:2px; }

/* ── Scrollbar ───────────────────────────────────────────── */
.cw-chat-area::-webkit-scrollbar,
.cw-home::-webkit-scrollbar,
.cw-contact::-webkit-scrollbar { width:4px; }
.cw-chat-area::-webkit-scrollbar-track,
.cw-home::-webkit-scrollbar-track,
.cw-contact::-webkit-scrollbar-track { background:transparent; }
.cw-chat-area::-webkit-scrollbar-thumb,
.cw-home::-webkit-scrollbar-thumb,
.cw-contact::-webkit-scrollbar-thumb { background:#cbd5e1; border-radius:2px; }

/* ── Mobile — fullscreen app-like ──────────────────────── */
@media (max-width: 640px) {
    #acc-chat-window {
        position:       fixed;
        inset:            0;
        bottom:           auto;
        left:             0;
        right:            0;
        top:              0;
        width:            100%;
        height:           100dvh;
        max-height:       100dvh;
        border-radius:    0;
        box-shadow:       none;
        padding-top:      env(safe-area-inset-top, 0);
        padding-bottom:   env(safe-area-inset-bottom, 0);
    }
    #acc-chat-window.open {
        transform: none;
    }
    #acc-chat-launcher.cw-hidden {
        display: none !important;
    }
    body.cw-open {
        overflow: hidden;
        overscroll-behavior: none;
    }
    .cw-header {
        padding: 10px 12px;
        padding-top: max(10px, env(safe-area-inset-top));
    }
    .cw-home, .cw-contact {
        padding: 12px 16px;
    }
    .cw-tabs {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .cw-tab {
        padding: 8px 2px 6px;
        font-size: 10px;
    }
    .cw-tab-icon { font-size: 18px; }
    #acc-chat-launcher { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) and (min-width: 641px) {
    #acc-chat-window {
        bottom:        0;
        left:          0;
        right:         0;
        width:         100%;
        height:        100dvh;
        border-radius: 0;
    }
}

/* ── Tracking Code Card ──────────────────────────────────── */
.cw-tracking-card {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    color: #fff;
    margin: 4px 0;
}
.cw-tracking-label {
    font-size: 11px;
    opacity: .85;
    margin-bottom: 6px;
}
.cw-tracking-code {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 6px;
    font-family: monospace;
    background: rgba(255,255,255,.15);
    border-radius: 8px;
    padding: 6px 12px;
    margin: 6px auto;
    display: inline-block;
}
.cw-tracking-hint {
    font-size: 10px;
    opacity: .8;
    line-height: 1.5;
    margin: 6px 0 8px;
}
.cw-copy-btn {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    padding: 4px 14px;
    cursor: pointer;
    transition: background .2s;
}
.cw-copy-btn:hover { background: rgba(255,255,255,.35); }

/* ── Support Hub ───────────────────────────────────────── */
.cw-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--cw-text);
    margin: 8px 0 10px;
}
.cw-service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.cw-service-card {
    background: var(--cw-bg);
    border: 1px solid var(--cw-border);
    border-radius: 10px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.cw-service-card:active,
.cw-service-card:hover {
    border-color: var(--cw-primary);
    background: #eff6ff;
}
.cw-service-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.cw-service-label { font-size: 11px; font-weight: 600; line-height: 1.4; }
.cw-case-card {
    background: var(--cw-surface);
    border: 1px solid var(--cw-border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
}
.cw-case-card:active { background: #eff6ff; }
.cw-case-code {
    font-family: monospace;
    font-size: 16px;
    font-weight: 800;
    color: #1d4ed8;
    letter-spacing: 2px;
}
.cw-case-meta { font-size: 11px; color: var(--cw-muted); margin-top: 4px; }
.cw-case-bar {
    padding: 8px 12px;
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.cw-track-lookup { margin-bottom: 12px; }
.cw-back-btn {
    background: none;
    border: none;
    color: var(--cw-primary);
    font-size: 12px;
    cursor: pointer;
    padding: 0 0 8px;
    font-family: inherit;
}
.cw-empty {
    text-align: center;
    color: var(--cw-muted);
    font-size: 12px;
    padding: 24px 12px;
}
.cw-wizard {
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cw-recent-cases { margin-top: 8px; }
.cw-track-detail { padding: 0 16px 16px; }
.cw-timeline { margin-top: 8px; }
.cw-tl-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 12px; }
.cw-tl-dot { width: 8px; height: 8px; background: #3b82f6; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.cw-pay-card {
    margin: 12px 0;
    padding: 14px;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
}
.cw-pay-label { font-size: 12px; color: #475569; margin-bottom: 6px; }
.cw-pay-amount { font-size: 22px; font-weight: 800; color: #1d4ed8; margin-bottom: 10px; }
.cw-pay-btn { margin-top: 4px; }

/* ── Technician Panel (ویجت کارشناس) ───────────────────── */
.cw-tech-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.cw-tech-login { flex: 1; overflow-y: auto; }
.cw-tech-hint {
    font-size: 10px;
    color: var(--cw-muted);
    text-align: center;
    margin-top: 10px;
    line-height: 1.6;
}
.cw-tech-hint code { background: #f1f5f9; padding: 1px 4px; border-radius: 3px; }
.cw-tech-err {
    color: #dc2626;
    font-size: 12px;
    text-align: center;
    margin-top: 8px;
    min-height: 18px;
}
.cw-tech-app {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.cw-tech-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #fff;
    font-size: 12px;
    flex-shrink: 0;
}
.cw-tech-logout-btn {
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.35);
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}
.cw-tech-list-view { flex: 1; overflow-y: auto; }
.cw-tech-chat-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0 12px 8px;
    overflow: hidden;
}
.cw-tech-chat-view .cw-chat-area {
    flex: 1;
    min-height: 120px;
    overflow-y: auto;
    margin: 8px 0;
}
.cw-tech-job-info {
    padding: 8px 0;
    border-bottom: 1px solid var(--cw-border);
    font-size: 12px;
}
.cw-tech-start-btn {
    margin-top: 8px;
    width: 100%;
    font-size: 12px;
    padding: 8px;
}
.cw-tech-status-pill {
    display: inline-block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 700;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 8px;
}
.cw-tech-job-card { border-right: 3px solid #3b82f6; }

/* Shop AI Advisor */
.cw-ai-mount { height: 100%; min-height: 320px; display: flex; flex-direction: column; }
.shop-ai { display: flex; flex-direction: column; height: 100%; font-size: 13px; }
.shop-ai__head { padding: 10px 14px; background: linear-gradient(135deg,#ecfdf5,#f0fdf4); border-bottom: 1px solid var(--cw-border); display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.shop-ai__head small { font-weight: 400; color: #64748b; font-size: 10px; }
.shop-ai__msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.shop-ai-msg { display: flex; }
.shop-ai-msg--user { justify-content: flex-end; }
.shop-ai-msg--bot { justify-content: flex-start; }
.shop-ai-msg__bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; line-height: 1.55; }
.shop-ai-msg--user .shop-ai-msg__bubble { background: #1b4332; color: #fff; border-bottom-left-radius: 4px; }
.shop-ai-msg--bot .shop-ai-msg__bubble { background: #f1f5f9; color: #1e293b; border-bottom-right-radius: 4px; }
.shop-ai__typing { padding: 4px 14px; font-size: 11px; color: #94a3b8; }
.shop-ai__suggestions { padding: 0 12px 8px; display: flex; flex-direction: column; gap: 6px; }
.shop-ai-sug { display: block; padding: 8px 10px; background: #fff; border: 1px solid var(--cw-border); border-radius: 10px; text-decoration: none; color: #1b4332; font-size: 12px; }
.shop-ai__chips { padding: 6px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.shop-ai__chips button { border: 1px solid #d1fae5; background: #ecfdf5; color: #166534; border-radius: 999px; padding: 4px 10px; font-size: 11px; cursor: pointer; }
.shop-ai__input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--cw-border); background: #fff; }
.shop-ai__input-row textarea { flex: 1; border: 1px solid var(--cw-border); border-radius: 12px; padding: 8px 10px; resize: none; font-family: inherit; font-size: 13px; }
.shop-ai__input-row button { width: 40px; height: 40px; border: none; border-radius: 50%; background: #1b4332; color: #fff; cursor: pointer; font-size: 16px; }

/* Wholesale B2B AI Advisor */
.ws-ai { display: flex; flex-direction: column; height: 100%; font-size: 13px; }
.ws-ai__head { padding: 10px 14px; background: linear-gradient(135deg,#e0f2fe,#f0f9ff); border-bottom: 1px solid var(--cw-border); display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: #0c4a6e; }
.ws-ai__head small { font-weight: 400; color: #64748b; font-size: 10px; }
.ws-ai__msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.ws-ai-msg { display: flex; }
.ws-ai-msg--user { justify-content: flex-end; }
.ws-ai-msg--bot { justify-content: flex-start; }
.ws-ai-msg__bubble { max-width: 88%; padding: 10px 12px; border-radius: 14px; line-height: 1.55; }
.ws-ai-msg--user .ws-ai-msg__bubble { background: #0c4a6e; color: #fff; border-bottom-left-radius: 4px; }
.ws-ai-msg--bot .ws-ai-msg__bubble { background: #f1f5f9; color: #1e293b; border-bottom-right-radius: 4px; }
.ws-ai__typing { padding: 4px 14px; font-size: 11px; color: #94a3b8; }
.ws-ai__chips { padding: 6px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-ai__chips button { border: 1px solid #bae6fd; background: #e0f2fe; color: #0369a1; border-radius: 999px; padding: 4px 10px; font-size: 11px; cursor: pointer; }
.ws-ai__input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--cw-border); background: #fff; }
.ws-ai__input-row textarea { flex: 1; border: 1px solid var(--cw-border); border-radius: 12px; padding: 8px 10px; resize: none; font-family: inherit; font-size: 13px; }
.ws-ai__input-row button { width: 40px; height: 40px; border: none; border-radius: 50%; background: #0c4a6e; color: #fff; cursor: pointer; font-size: 16px; }
