/* Suimas Live Chat Widget — scoped under #slc-root to avoid theme conflicts */

#slc-root { --slc-color: #10b981; --slc-color-dark: #059669; --slc-accent: #f97316; }

#slc-bubble {
    position: fixed;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #f97316 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2147483000;
    box-shadow: 0 4px 20px rgba(16,185,129,.45);
    transition: transform .2s, box-shadow .2s;
    border: none;
    outline: none;
}
#slc-bubble:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(16,185,129,.55); }
#slc-bubble svg { width: 28px; height: 28px; pointer-events: none; }

/* Pulse ring on bubble */
#slc-bubble::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #f97316);
    opacity: .3;
    animation: slc-pulse 2.5s ease-in-out infinite;
    z-index: -1;
}
@keyframes slc-pulse {
    0%   { transform: scale(1);    opacity: .3; }
    65%  { transform: scale(1.55); opacity: 0;  }
    100% { transform: scale(1.55); opacity: 0;  }
}

/* Unread badge */
#slc-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 20px; height: 20px;
    background: #ef4444;
    border-radius: 50%;
    border: 2.5px solid #fff;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
}

/* Chat window */
#slc-window {
    position: fixed;
    bottom: 96px;
    width: 360px;
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    z-index: 2147483001;
    overflow: hidden;
    transform: scale(0) translateY(20px);
    transform-origin: bottom right;
    opacity: 0;
    transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .22s;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
}
#slc-window.slc-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
#slc-window.slc-pos-left { transform-origin: bottom left; }

/* Header */
#slc-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 55%, #f97316 140%);
    color: #fff;
    padding: 15px 16px 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
#slc-avatar {
    width: 40px; height: 40px;
    background: rgba(255,255,255,.22);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.28);
}
#slc-header-info { flex: 1; min-width: 0; }
#slc-header-info strong { display: block; font-size: 14px; font-weight: 700; }
#slc-status { font-size: 11px; opacity: .9; display: flex; align-items: center; gap: 5px; }
#slc-status::before {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    background: #6ee7b7;
    border-radius: 50%;
    animation: slc-blink 2s ease-in-out infinite;
}
@keyframes slc-blink { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
#slc-close {
    background: rgba(255,255,255,.18); border: none; color: #fff;
    font-size: 15px; cursor: pointer; padding: 6px;
    opacity: .9; line-height: 1; border-radius: 8px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: background .15s;
}
#slc-close:hover { opacity: 1; background: rgba(255,255,255,.28); }

/* Messages area */
#slc-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
    background: #f0fdf8;
}
#slc-messages::-webkit-scrollbar { width: 4px; }
#slc-messages::-webkit-scrollbar-thumb { background: #a7f3d0; border-radius: 4px; }

/* Message bubbles */
.slc-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 13.5px;
    word-break: break-word;
    line-height: 1.46;
    animation: slc-fadein .22s ease;
}
@keyframes slc-fadein { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

.slc-msg-bot {
    background: #fff;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
}
.slc-msg-user {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

/* Typing indicator */
.slc-typing {
    align-self: flex-start;
    background: #fff;
    border-radius: 18px 18px 18px 4px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
    display: flex; align-items: center; gap: 5px;
}
.slc-dot {
    width: 7px; height: 7px;
    background: #10b981;
    border-radius: 50%;
    animation: slc-bounce 1.3s ease-in-out infinite;
}
.slc-dot:nth-child(2) { animation-delay: .2s; }
.slc-dot:nth-child(3) { animation-delay: .4s; }
@keyframes slc-bounce {
    0%,60%,100% { transform: translateY(0); }
    30%          { transform: translateY(-6px); }
}

/* Input area */
#slc-input-area {
    padding: 10px 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px solid #e5e7eb;
    background: #fff;
    flex-shrink: 0;
}
#slc-input {
    flex: 1;
    border: 1.5px solid #d1fae5;
    border-radius: 22px;
    padding: 9px 15px;
    font-size: 13.5px;
    outline: none;
    background: #f0fdf8;
    color: #1f2937;
    font-family: inherit;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
#slc-input:focus { border-color: #10b981; background: #fff; box-shadow: 0 0 0 3px rgba(16,185,129,.12); }
#slc-input::placeholder { color: #9ca3af; }
#slc-send {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #f97316);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s, transform .15s;
    box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
#slc-send:hover { opacity: .88; transform: scale(1.07); }

/* Powered by footer */
#slc-footer {
    text-align: center;
    font-size: 10.5px;
    color: #9ca3af;
    padding: 5px 0 8px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
}
#slc-footer a { color: #10b981; text-decoration: none; }
#slc-footer a:hover { color: #059669; }

/* Done state */
#slc-done {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    gap: 10px;
    text-align: center;
    background: #f0fdf8;
    flex: 1;
}
#slc-done-icon { font-size: 42px; }
#slc-done h3 { margin: 0; font-size: 15px; color: #1f2937; }
#slc-done p  { margin: 0; font-size: 13px; color: #6b7280; }

/* ── Responsive — mobile bottom-sheet ───────────────────────────────────── */
@media (max-width: 480px) {
    #slc-bubble { width: 52px; height: 52px; bottom: 18px; }

    #slc-window {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 68vh !important;
        max-height: 68vh !important;
        border-radius: 22px 22px 0 0 !important;
        transform-origin: bottom center !important;
        transform: translateY(110%) !important;
        opacity: 1 !important;
        transition: transform .32s cubic-bezier(.32,.72,0,1) !important;
        box-shadow: 0 -4px 30px rgba(0,0,0,.15) !important;
    }
    #slc-window.slc-open {
        transform: translateY(0) !important;
    }
}

@media (max-width: 360px) {
    #slc-window {
        height: 72vh !important;
        max-height: 72vh !important;
    }
}
