/**
 * SMC Canvas CSS — v4.0.0
 * Unified floating / trigger-based chat canvas for Multivendor Modern Chat.
 * Ported from Support Center plugin design system; scoped to .smc-canvas-wrap
 * so it never conflicts with the legacy [simple_chat] shortcode container.
 */

/* ── CSS Variables ─────────────────────────────────────────── */
.smc-canvas-wrap {
    --smc-brand:        #4f46e5;
    --smc-brand-dark:   #3730a3;
    --smc-brand-light:  #eef2ff;
    --smc-text:         #111827;
    --smc-text-muted:   #6B7280;
    --smc-border:       rgba(0,0,0,0.09);
    --smc-bg:           #ffffff;
    --smc-bg2:          #F9FAFB;
    --smc-bg3:          #F3F4F6;
    --smc-radius:       12px;
    --smc-radius-sm:    8px;
    --smc-shadow:       0 4px 24px rgba(0,0,0,0.12);
    --smc-font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    font-family:    var(--smc-font);
    width:          420px;
    max-width:      100%;
    height:         580px;
    max-height:     90vh;
    display:        flex;
    flex-direction: column;
    border:         1px solid var(--smc-border);
    border-radius:  16px;
    overflow:       hidden;
    box-shadow:     0 8px 40px rgba(0,0,0,0.16);
    background:     #ffffff;
    position:       relative;
    color:          var(--smc-text);
}

/* ── HEADER ────────────────────────────────────────────────── */
.smc-cv-header {
    background:    var(--smc-brand);
    padding:       18px 18px 28px;
    flex-shrink:   0;
    position:      sticky;
    top:           0;
    z-index:       10;
}
.smc-cv-header-top {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    margin-bottom:   12px;
}
.smc-cv-logo {
    display:     flex;
    align-items: center;
    gap:         8px;
}
.smc-cv-logo-circle {
    width:           34px;
    height:          34px;
    border-radius:   50%;
    background:      rgba(255,255,255,0.25);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       12px;
    font-weight:     600;
    color:           #fff;
    overflow:        hidden;
    flex-shrink:     0;
}
.smc-cv-logo-circle img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.smc-cv-logo-name {
    font-size:   14px;
    font-weight: 500;
    color:       #fff;
    max-width:   180px;
    white-space: nowrap;
    overflow:    hidden;
    text-overflow: ellipsis;
}
.smc-cv-store-name {
    font-size: 10px;
    color: rgba(255,255,255,0.78);
    font-weight: 400;
    display: block;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.smc-cv-header-actions {
    display:     flex;
    align-items: center;
    gap:         4px;
}
.smc-cv-hdr-btn {
    background:    rgba(255,255,255,0.2);
    border:        none;
    border-radius: 50%;
    width:         28px;
    height:        28px;
    display:       flex;
    align-items:   center;
    justify-content: center;
    cursor:        pointer;
    color:         #fff;
    font-size:     14px;
    line-height:   1;
    transition:    background 0.15s;
}
.smc-cv-hdr-btn:hover { background: rgba(255,255,255,0.32); }

.smc-cv-vendor-status {
    display:     flex;
    align-items: center;
    gap:         5px;
    margin-top:  4px;
}
.smc-cv-status-dot {
    width:         7px;
    height:        7px;
    border-radius: 50%;
    background:    #6B7280;
    flex-shrink:   0;
    transition:    background 0.3s;
}
.smc-cv-status-dot.online  { background: #10B981; }
.smc-cv-status-dot.offline { background: #6B7280; }
.smc-cv-status-text {
    font-size: 11px;
    color: rgba(255,255,255,0.85);
}

/* ── TAB NAV ───────────────────────────────────────────────── */
.smc-cv-nav {
    display:          flex;
    align-items:      center;
    background:       #fff;
    border-bottom:    1px solid var(--smc-border);
    overflow-x:       auto;
    flex-shrink:      0;
    scrollbar-width:  none;
}
.smc-cv-nav::-webkit-scrollbar { display: none; }
.smc-cv-tab {
    flex:            0 0 auto;
    padding:         10px 14px;
    font-size:       12px;
    font-weight:     500;
    color:           var(--smc-text-muted);
    background:      none;
    border:          none;
    border-bottom:   2px solid transparent;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    gap:             5px;
    white-space:     nowrap;
    font-family:     var(--smc-font);
    transition:      color 0.15s, border-color 0.15s;
    align-self:      stretch;
}
.smc-cv-tab svg { width: 13px; height: 13px; }
.smc-cv-tab.active {
    color:        var(--smc-brand);
    border-color: var(--smc-brand);
}
.smc-cv-tab:hover:not(.active) { color: var(--smc-text); }

/* Language selector — pinned to the far right of the nav row */
.smc-cv-nav-lang {
    display:     flex;
    align-items: center;
    gap:         4px;
    margin-left: auto;
    padding:     0 12px;
    flex-shrink: 0;
}
.smc-cv-nav-lang-icon { font-size: 13px; line-height: 1; }
.smc-cv-lang-select {
    font-size:     11px;
    font-family:   var(--smc-font);
    border:        1px solid var(--smc-border);
    border-radius: 5px;
    padding:       3px 5px;
    background:    var(--smc-bg);
    color:         var(--smc-text);
    cursor:        pointer;
    max-width:     90px;
}

/* ── SCREENS ───────────────────────────────────────────────── */
.smc-cv-screen { display: none; }
.smc-cv-screen.active {
    display:        flex;
    flex-direction: column;
    flex:           1;
    min-height:     0;
    overflow-y:     auto;
}

/* ── CHAT SCREEN ───────────────────────────────────────────── */
.smc-cv-screen-chat.active { overflow: hidden; }

.smc-cv-messages {
    flex:       1;
    overflow-y: auto;
    padding:    14px 14px 8px;
    display:    flex;
    flex-direction: column;
    gap:        4px;
    min-height: 0;
    scroll-behavior: smooth;
}
.smc-cv-messages::-webkit-scrollbar { width: 4px; }
.smc-cv-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

.smc-cv-welcome-msg { text-align: center; padding: 16px 0 8px; }
.smc-cv-welcome-bubble {
    display:       inline-block;
    background:    var(--smc-bg3);
    border-radius: 12px;
    padding:       8px 14px;
    font-size:     13px;
    color:         var(--smc-text-muted);
}

/* message bubbles (reuse simple-chat.js output structure) */
.smc-cv-messages .message-row { display: flex; gap: 8px; margin-bottom: 6px; }
.smc-cv-messages .message-row.customer { flex-direction: row-reverse; }
.smc-cv-messages .message-bubble {
    max-width:     72%;
    padding:       8px 12px;
    border-radius: 14px;
    font-size:     13px;
    line-height:   1.45;
    word-break:    break-word;
}
.smc-cv-messages .message-row.vendor   .message-bubble { background: var(--smc-bg3); color: var(--smc-text); border-bottom-left-radius: 4px; }
.smc-cv-messages .message-row.customer .message-bubble { background: var(--smc-brand); color: #fff; border-bottom-right-radius: 4px; }
.smc-cv-messages .message-time { font-size: 10px; color: var(--smc-text-muted); margin-top: 2px; }

/* New-message badge */
#smc-cv-new-msg-badge {
    display:       none;
    position:      absolute;
    bottom:        90px;
    left:          50%;
    transform:     translateX(-50%);
    background:    var(--smc-brand);
    color:         #fff;
    font-size:     11px;
    font-weight:   600;
    padding:       5px 14px;
    border-radius: 20px;
    cursor:        pointer;
    z-index:       20;
    box-shadow:    0 2px 8px rgba(79,70,229,0.35);
    white-space:   nowrap;
}

/* Typing indicator */
.smc-cv-typing {
    display:     flex;
    align-items: center;
    gap:         8px;
    padding:     6px 14px;
    flex-shrink: 0;
}
.smc-cv-typing-dots {
    display:     flex;
    gap:         4px;
    align-items: center;
}
.smc-cv-typing-dots span {
    width:         6px;
    height:        6px;
    border-radius: 50%;
    background:    var(--smc-text-muted);
    animation:     smcTypingBounce 1.2s infinite;
}
.smc-cv-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.smc-cv-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes smcTypingBounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%           { transform: translateY(-5px); }
}

/* Ended banner */
.smc-cv-ended-banner {
    text-align:    center;
    padding:       8px 14px;
    font-size:     12px;
    color:         var(--smc-text-muted);
    background:    var(--smc-bg2);
    border-top:    1px solid var(--smc-border);
    flex-shrink:   0;
}

/* Input bar */
.smc-cv-input-bar {
    display:       flex;
    align-items:   flex-end;
    gap:           8px;
    padding:       8px 10px;
    border-top:    1px solid var(--smc-border);
    background:    var(--smc-bg);
    flex-shrink:   0;
}
.smc-cv-attach-btn {
    background: none;
    border:     none;
    font-size:  18px;
    cursor:     pointer;
    padding:    4px;
    opacity:    0.7;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.smc-cv-attach-btn:hover { opacity: 1; }
.smc-cv-textarea {
    flex:        1;
    border:      none;
    outline:     none;
    font-size:   13px;
    font-family: var(--smc-font);
    background:  transparent;
    resize:      none;
    overflow:    hidden;
    line-height: 1.45;
    max-height:  100px;
    padding:     6px 0;
    color:       var(--smc-text);
}
.smc-cv-textarea::placeholder { color: var(--smc-text-muted); }
.smc-cv-send-btn {
    width:         34px;
    height:        34px;
    border-radius: 50%;
    background:    var(--smc-brand);
    border:        none;
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    justify-content: center;
    flex-shrink:   0;
    transition:    background 0.15s, opacity 0.15s;
}
.smc-cv-send-btn:disabled { opacity: 0.45; cursor: default; }
.smc-cv-send-btn svg { width: 16px; height: 16px; }

.smc-cv-restart-bar {
    padding:    10px 14px;
    text-align: center;
    flex-shrink: 0;
}
.smc-cv-restart-btn {
    background:    transparent;
    border:        1px solid var(--smc-brand);
    color:         var(--smc-brand);
    border-radius: 20px;
    padding:       7px 20px;
    font-size:     13px;
    font-weight:   500;
    cursor:        pointer;
    font-family:   var(--smc-font);
    transition:    background 0.15s, color 0.15s;
}
.smc-cv-restart-btn:hover { background: var(--smc-brand); color: #fff; }

/* ── VOICE SCREEN ──────────────────────────────────────────── */
.smc-cv-screen-voice.active {
    align-items: center;
    overflow-y:  auto;
}
.smc-cv-voice-body {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    padding:        28px 20px 20px;
    width:          100%;
}
.smc-cv-call-state-label {
    font-size:      10px;
    font-weight:    600;
    color:          var(--smc-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom:  20px;
}
.smc-cv-call-avatar-ring {
    width:         90px;
    height:        90px;
    border-radius: 50%;
    border:        3px solid var(--smc-brand);
    padding:       4px;
    margin-bottom: 14px;
    transition:    box-shadow 0.3s;
}
.smc-cv-call-avatar-ring.ringing {
    animation: smcRingPulse 1.5s infinite;
}
@keyframes smcRingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0.35); }
    50%       { box-shadow: 0 0 0 14px rgba(79,70,229,0); }
}
.smc-cv-call-avatar-inner {
    width:           100%;
    height:          100%;
    border-radius:   50%;
    background:      var(--smc-brand-light);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       26px;
    font-weight:     600;
    color:           var(--smc-brand-dark);
    overflow:        hidden;
}
.smc-cv-call-avatar-inner img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.smc-cv-call-vendor-name {
    font-size:     18px;
    font-weight:   500;
    color:         var(--smc-text);
    margin-bottom: 4px;
    text-align:    center;
}
.smc-cv-call-status {
    font-size:     12px;
    color:         var(--smc-text-muted);
    margin-bottom: 6px;
    text-align:    center;
}
.smc-cv-call-timer {
    font-size:            26px;
    font-weight:          500;
    color:                var(--smc-text);
    font-variant-numeric: tabular-nums;
    margin-bottom:        20px;
}
.smc-cv-call-controls {
    display:       flex;
    gap:           14px;
    margin-bottom: 20px;
}
.smc-cv-call-ctrl {
    display:        flex;
    flex-direction: column;
    align-items:    center;
    gap:            5px;
    cursor:         pointer;
}
.smc-cv-call-ctrl-btn {
    width:           48px;
    height:          48px;
    border-radius:   50%;
    background:      var(--smc-bg2);
    border:          1px solid var(--smc-border);
    display:         flex;
    align-items:     center;
    justify-content: center;
    font-size:       18px;
    cursor:          pointer;
    font-family:     var(--smc-font);
    transition:      background 0.15s;
}
.smc-cv-call-ctrl-btn:hover { background: var(--smc-bg3); }
.smc-cv-call-ctrl-btn.active {
    background:    var(--smc-brand-light);
    border-color:  var(--smc-brand);
}
.smc-cv-call-ctrl-label { font-size: 10px; color: var(--smc-text-muted); }

.smc-cv-call-cta { margin-bottom: 10px; }
.smc-cv-start-call-btn {
    background:    var(--smc-brand);
    color:         #fff;
    border:        none;
    border-radius: 24px;
    padding:       12px 28px;
    font-size:     14px;
    font-weight:   500;
    cursor:        pointer;
    font-family:   var(--smc-font);
    transition:    background 0.15s;
}
.smc-cv-start-call-btn:hover { background: var(--smc-brand-dark); }

.smc-cv-end-call-btn {
    width:           60px;
    height:          60px;
    border-radius:   50%;
    background:      #EF4444;
    border:          none;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    margin-bottom:   16px;
    transition:      background 0.15s;
}
.smc-cv-end-call-btn:hover { background: #DC2626; }
.smc-cv-end-call-btn svg { width: 24px; height: 24px; }

.smc-cv-post-call-csat { text-align: center; width: 100%; }
.smc-cv-post-call-csat p { font-size: 13px; color: var(--smc-text-muted); margin-bottom: 10px; }
.smc-cv-csat-emojis { display: flex; gap: 10px; justify-content: center; }
.smc-cv-csat-emojis span {
    font-size:  22px;
    cursor:     pointer;
    transition: transform 0.15s;
}
.smc-cv-csat-emojis span:hover { transform: scale(1.25); }

/* ── FLOATING LAUNCHER ─────────────────────────────────────── */
#smc-floating-root { position: fixed !important; z-index: 99990; }

#smc-floating-btn {
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
    background:      var(--smc-float-color, #4f46e5);
    color:           #fff;
    border:          none;
    cursor:          pointer;
    font-size:       15px;
    font-weight:     600;
    font-family:     -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    box-shadow:      0 4px 20px rgba(0,0,0,0.25);
    white-space:     nowrap;
    line-height:     1;
    position:        relative;
    transition:      opacity 0.18s ease, transform 0.18s ease, box-shadow 0.15s ease;
}
#smc-floating-btn:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.32) !important;
    transform:  translateY(-2px);
}
#smc-floating-btn.smc-btn-hidden {
    opacity:        0;
    pointer-events: none;
    transform:      scale(0.85);
}
.smc-float-unread-badge {
    display:         none;
    background:      #ef4444;
    color:           #fff;
    border-radius:   50%;
    width:           18px;
    height:          18px;
    font-size:       10px;
    font-weight:     700;
    align-items:     center;
    justify-content: center;
    line-height:     1;
    position:        absolute;
    top:             -4px;
    right:           -4px;
}
.smc-launcher-icon {
    width:         22px;
    height:        22px;
    object-fit:    contain;
    display:       block;
    border-radius: 4px;
}

/* Floating panel */
#smc-floating-panel,
#smc-trigger-panel {
    transform-origin:        bottom right;
    animation-duration:      0.30s;
    animation-fill-mode:     both;
    animation-timing-function: ease-out;
}
#smc-floating-panel.smc-panel-open,
#smc-trigger-panel.smc-panel-open  { animation-name: smcSlideUp; }
#smc-floating-panel.smc-panel-close,
#smc-trigger-panel.smc-panel-close {
    animation-name:            smcSlideDown;
    animation-timing-function: ease-in;
    animation-duration:        0.18s;
}

@keyframes smcSlideUp {
    from { opacity: 0; transform: translateY(18px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@keyframes smcSlideDown {
    from { opacity: 1; transform: translateY(0)    scale(1); }
    to   { opacity: 0; transform: translateY(18px) scale(0.96); }
}

#smc-floating-panel .smc-canvas-wrap,
#smc-trigger-panel  .smc-canvas-wrap {
    border-radius: 16px;
    box-shadow:    none;
    max-width:     100%;
    margin:        0;
    width:         100%;
    height:        580px;
    max-height:    82vh;
}

/* ── MOBILE ────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .smc-canvas-wrap {
        width:         100vw;
        max-width:     100vw;
        height:        100dvh;
        max-height:    100dvh;
        border-radius: 16px 16px 0 0;
        margin:        0;
        position:      fixed;
        bottom:        0;
        left:          0;
        right:         0;
        z-index:       9999;
        box-shadow:    0 -4px 24px rgba(0,0,0,0.14);
    }
    #smc-floating-panel,
    #smc-trigger-panel {
        width:         100vw !important;
        max-width:     100vw !important;
        left:          0 !important;
        right:         0 !important;
        bottom:        0 !important;
        top:           auto !important;
        transform:     none !important;
        border-radius: 16px 16px 0 0 !important;
    }
    #smc-floating-panel .smc-canvas-wrap,
    #smc-trigger-panel  .smc-canvas-wrap {
        border-radius: 16px 16px 0 0;
        height:        100dvh;
        max-height:    100dvh;
    }
}

/* ── VENDOR INCOMING-CALL OVERLAY (on vendor dashboard page) ─ */
#smc-vendor-incoming-overlay {
    display:        none;
    position:       fixed;
    top:            20px;
    right:          20px;
    background:     #1f2937;
    color:          #fff;
    padding:        20px 24px;
    border-radius:  14px;
    box-shadow:     0 8px 32px rgba(0,0,0,0.45);
    z-index:        99999;
    min-width:      270px;
    text-align:     center;
    animation:      smcSlideUp 0.25s ease-out both;
}
#smc-vendor-incoming-overlay .smc-inc-icon  { font-size: 28px; margin-bottom: 6px; animation: smcRingBell 0.6s infinite; }
@keyframes smcRingBell {
    0%, 100% { transform: rotate(0deg); }
    20%       { transform: rotate(-12deg); }
    60%       { transform: rotate(12deg); }
}
#smc-vendor-incoming-overlay .smc-inc-name  { font-weight: 600; font-size: 15px; margin-bottom: 3px; }
#smc-vendor-incoming-overlay .smc-inc-label { font-size: 12px; color: #9ca3af; margin-bottom: 16px; }
#smc-vendor-incoming-overlay .smc-inc-btns  { display: flex; gap: 10px; justify-content: center; }

.smc-inc-answer-btn,
.smc-inc-decline-btn {
    border:        none;
    border-radius: 8px;
    padding:       9px 20px;
    font-size:     13px;
    cursor:        pointer;
    font-weight:   600;
    font-family:   -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    transition:    opacity 0.15s;
}
.smc-inc-answer-btn  { background: #059669; color: #fff; }
.smc-inc-decline-btn { background: #dc2626; color: #fff; }
.smc-inc-answer-btn:hover  { opacity: 0.88; }
.smc-inc-decline-btn:hover { opacity: 0.88; }

/* Vendor active-call panel (floating, bottom-right of vendor dashboard) */
#smc-vendor-call-panel {
    display:        none;
    position:       fixed;
    bottom:         20px;
    right:          20px;
    background:     #1f2937;
    color:          #fff;
    padding:        18px 20px;
    border-radius:  14px;
    box-shadow:     0 8px 32px rgba(0,0,0,0.45);
    z-index:        99999;
    min-width:      250px;
    flex-direction: column;
    align-items:    center;
    gap:            8px;
    text-align:     center;
}
#smc-vendor-call-panel.active { display: flex; }

.smc-vendor-call-caller { font-weight: 600; font-size: 14px; }
.smc-vendor-call-status { font-size: 12px; color: #9ca3af; }
.smc-vendor-call-timer  { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.smc-vendor-call-btns   { display: flex; gap: 8px; margin-top: 4px; }
.smc-vendor-call-ctrl-btn {
    background:    #374151;
    border:        none;
    border-radius: 8px;
    padding:       8px 12px;
    cursor:        pointer;
    font-size:     16px;
    transition:    background 0.15s;
}
.smc-vendor-call-ctrl-btn:hover   { background: #4B5563; }
.smc-vendor-call-ctrl-btn.active  { background: #1d4ed8; }
.smc-vendor-hangup-btn {
    background: #dc2626;
    border:     none;
    border-radius: 8px;
    padding:    8px 12px;
    cursor:     pointer;
    font-size:  16px;
    transition: background 0.15s;
}
.smc-vendor-hangup-btn:hover { background: #b91c1c; }

/* ── Override legacy simple-chat.css inside the canvas ──────── */

/* Container: reset box-model so it fills the screen slot cleanly */
.smc-canvas-wrap .simple-modern-chat-container {
    box-shadow:    none !important;
    border:        none !important;
    border-radius: 0    !important;
    max-width:     100% !important;
    height:        100% !important;
    margin:        0    !important;
    background:    transparent !important;
}
/* Hide the old chat-header — the canvas header replaces it */
.smc-canvas-wrap .simple-modern-chat-container .chat-header { display: none !important; }

/* Messages container */
.smc-canvas-wrap .messages-container {
    flex:           1;
    overflow-y:     auto;
    padding:        12px 14px 6px;
    display:        flex;
    flex-direction: column;
    gap:            4px;
    scroll-behavior: smooth;
}
.smc-canvas-wrap .messages-container::-webkit-scrollbar { width: 4px; }
.smc-canvas-wrap .messages-container::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 2px; }

/* ── Input area — full reset matching modern redesign ──────────── */
.smc-canvas-wrap .input-area {
    background:  #ffffff !important;
    border-top:  1px solid var(--smc-border) !important;
    padding:     12px 16px !important;
    flex-shrink: 0;
    position:    relative;
    z-index:     2;
}
.smc-canvas-wrap .input-wrapper {
    display:        flex !important;
    align-items:    flex-end !important;
    gap:            8px !important;
    background:     #f3f4f6 !important;
    border:         1.5px solid #e5e7eb !important;
    border-radius:  24px !important;
    padding:        6px 6px 6px 14px !important;
    box-shadow:     none !important;
    transition:     border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease !important;
    min-height:     48px;
}
.smc-canvas-wrap .input-wrapper:focus-within {
    border-color: var(--smc-brand) !important;
    background:   #ffffff !important;
    box-shadow:   0 0 0 3px rgba(99,102,241,0.12) !important;
}
.smc-canvas-wrap #message-input {
    flex:        1 !important;
    border:      none !important;
    background:  transparent !important;
    font-size:   14px !important;
    font-family: var(--smc-font) !important;
    outline:     none !important;
    padding:     8px 0 !important;
    color:       var(--smc-text) !important;
    line-height: 1.5 !important;
    min-width:   0;
    max-height:  96px;
    overflow-y:  auto;
    resize:      none;
}
.smc-canvas-wrap #message-input::placeholder { color: var(--smc-text-muted) !important; }

/* Send button — circular icon button */
.smc-canvas-wrap .send-btn,
.smc-canvas-wrap .smc-cv-send-btn {
    width:           38px !important;
    height:          38px !important;
    min-width:       38px !important;
    padding:         0 !important;
    border-radius:   50% !important;
    background:      linear-gradient(135deg, #6366f1, var(--smc-brand, #4f46e5)) !important;
    border:          none !important;
    cursor:          pointer;
    display:         flex !important;
    align-items:     center !important;
    justify-content: center !important;
    flex-shrink:     0;
    align-self:      flex-end;
    transition:      background 0.18s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow:      0 2px 6px rgba(79,70,229,0.35) !important;
}
.smc-canvas-wrap .send-btn:hover:not(:disabled),
.smc-canvas-wrap .smc-cv-send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--smc-brand, #4f46e5), var(--smc-brand-dark, #3730a3)) !important;
    transform:  scale(1.06) !important;
    box-shadow: 0 4px 10px rgba(79,70,229,0.45) !important;
}
.smc-canvas-wrap .send-btn:active:not(:disabled),
.smc-canvas-wrap .smc-cv-send-btn:active:not(:disabled) { transform: scale(0.96) !important; }
.smc-canvas-wrap .send-btn:disabled,
.smc-canvas-wrap .smc-cv-send-btn:disabled { opacity: 0.4; cursor: default; background: #9ca3af !important; box-shadow: none !important; }
/* Hide the text spans inside the send button, show only SVG */
.smc-canvas-wrap .send-btn .send-text,
.smc-canvas-wrap .send-btn .send-loading { display: none !important; }
.smc-canvas-wrap .send-btn svg,
.smc-canvas-wrap .smc-cv-send-btn svg {
    width: 15px !important; height: 15px !important; display: block; fill: #fff; stroke: none;
}

/* ── Message bubbles ───────────────────────────────────────── */
.smc-canvas-wrap .message { display: flex; margin-bottom: 6px; }
.smc-canvas-wrap .message.customer-message { justify-content: flex-end; }
.smc-canvas-wrap .message-content {
    max-width:     72%;
    padding:       10px 14px;
    border-radius: 18px;
    font-size:     14px;
    line-height:   1.5;
    word-break:    break-word;
    -webkit-font-smoothing: antialiased;
}
/* Vendor (received) bubble — white card with subtle border */
.smc-canvas-wrap .message.vendor-message .message-content {
    background:              #ffffff;
    color:                   #111827;
    border-bottom-left-radius: 4px;
    border:                  1px solid #e5e7eb;
    box-shadow:              0 1px 4px rgba(0,0,0,0.06);
}
/* Customer (sent) bubble — vivid brand gradient, white text */
.smc-canvas-wrap .message.customer-message .message-content {
    background:               linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color:                    #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow:               0 2px 8px rgba(79,70,229,0.28);
}
.smc-canvas-wrap .message-time { font-size: 10px; color: #6B7280; margin-top: 3px; }

/* ── Typing indicator ──────────────────────────────────────── */
.smc-canvas-wrap .typing-indicator {
    display:     flex;
    align-items: center;
    gap:         6px;
    padding:     6px 14px;
}
.smc-canvas-wrap .typing-indicator span:not(.typing-text) {
    width:         6px;
    height:        6px;
    border-radius: 50%;
    background:    #9ca3af;
    animation:     smcTypingBounce 1.2s infinite;
    display:       inline-block;
}
.smc-canvas-wrap .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.smc-canvas-wrap .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
