:root{--ac-w-primary:#289deb;--ac-w-visitor:#f0f4f8;--ac-w-radius:16px;--ac-w-size:56px;--ac-w-pos-right:24px;--ac-w-pos-bottom:24px}
*{box-sizing:border-box;margin:0;padding:0}
#app-aichat-root{position:fixed;z-index:2147483600;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:15px;line-height:1.5}
#app-aichat-root.pos-right{right:var(--ac-w-pos-right);bottom:var(--ac-w-pos-bottom)}
#app-aichat-root.pos-left{left:var(--ac-w-pos-right);bottom:var(--ac-w-pos-bottom)}
.aichat-btn{width:var(--ac-w-size);height:var(--ac-w-size);border-radius:50%;background:var(--ac-w-primary);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 20px rgba(0,0,0,.22);transition:transform .25s cubic-bezier(.34,1.56,.64,1),box-shadow .2s;position:relative;outline:none;-webkit-tap-highlight-color:transparent}
.aichat-btn:hover{transform:scale(1.09);box-shadow:0 6px 28px rgba(0,0,0,.28)}
.aichat-btn:active{transform:scale(.95)}
.aichat-btn svg,.aichat-btn i{color:#fff;font-size:calc(var(--ac-w-size) * .44);width:calc(var(--ac-w-size) * .44);height:calc(var(--ac-w-size) * .44)}
.aichat-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;background:#ef4444;border-radius:50%;border:2px solid #fff;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px;animation:aichat-pulse 2s infinite;opacity:0;    transition: opacity .2s, transform .25s cubic-bezier(.34,1.56,.64,1);
    transform: scale(0);}
.aichat-badge.visible{opacity:1}
@keyframes aichat-pulse{0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.5)}50%{box-shadow:0 0 0 6px rgba(239,68,68,0)}}
.aichat-btn-open .aichat-icon-chat{opacity:0;transform:rotate(90deg) scale(.6)}
.aichat-btn-open .aichat-icon-close{opacity:1;transform:rotate(0deg) scale(1)}
.aichat-icon-chat,.aichat-icon-close{transition:opacity .25s,transform .25s;position:absolute}
.aichat-icon-close{opacity:0;transform:rotate(-90deg) scale(.6)}
.aichat-window{position:absolute;bottom:calc(var(--ac-w-size) + 16px);width:370px;height:560px;background:#fff;border-radius:var(--ac-w-radius);box-shadow:0 12px 60px rgba(0,0,0,.18),0 2px 12px rgba(0,0,0,.08);display:flex;flex-direction:column;overflow:hidden;transform-origin:bottom right;transition:transform .3s cubic-bezier(.34,1.4,.64,1),opacity .25s}
#app-aichat-root.pos-right .aichat-window{right:0;transform-origin:bottom right}
#app-aichat-root.pos-left .aichat-window{left:0;transform-origin:bottom left}
.aichat-window.hidden{opacity:0;transform:scale(.88) translateY(12px);pointer-events:none}
.aichat-window.visible{opacity:1;transform:scale(1) translateY(0)}
.aichat-header{background:var(--ac-w-primary);padding:18px 18px 16px;display:flex;align-items:center;gap:12px;position:relative;flex-shrink:0}
.aichat-header-gradient{background:linear-gradient(135deg,var(--ac-w-primary),var(--ac-w-grad-end,var(--ac-w-primary)))}
.aichat-avatar{width:42px;height:42px;border-radius:50%;background:rgba(255,255,255,.25);display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden}
.aichat-avatar img{width:100%;height:100%;object-fit:cover}
.aichat-avatar-icon{color:#fff;font-size:20px}
.aichat-header-info{flex:1;min-width:0}
.aichat-header-name{color:#fff;font-weight:700;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.aichat-header-sub{color:rgba(255,255,255,.8);font-size:13px}
.aichat-header-close{background:none;border:none;cursor:pointer;color:rgba(255,255,255,.8);font-size:18px;padding:6px;border-radius:8px;transition:background .15s,color .15s;display:flex;align-items:center;justify-content:center;line-height:1;flex-shrink:0}
.aichat-header-close:hover{background:rgba(255,255,255,.15);color:#fff}
.aichat-header-close svg{width:24px;height:24px}
.aichat-online-dot{width:10px;height:10px;background:#22c55e;border-radius:50%;border:2px solid rgba(255,255,255,.4);animation:aichat-blink 2.4s infinite;display:inline-block;margin-right:5px}
@keyframes aichat-blink{0%,100%{opacity:1}50%{opacity:.5}}
.aichat-prechat{flex:1;display:flex;flex-direction:column;overflow-y:auto;padding:24px 20px}
.aichat-prechat-title{font-size:18px;font-weight:700;color:#111;margin-bottom:6px}
.aichat-prechat-sub{font-size:14px;color:#6b7280;margin-bottom:20px}
.aichat-field{margin-bottom:14px}
.aichat-field label{display:block;font-size:13px;font-weight:600;color:#374151;margin-bottom:5px}
.aichat-field input,.aichat-field select{width:100%;border:1.5px solid #e5e7eb;border-radius:10px;padding:10px 14px;font-size:15px;color:#111;transition:border-color .15s,box-shadow .15s;outline:none;background:#fff;font-family:inherit}
.aichat-field input:focus,.aichat-field select:focus{border-color:var(--ac-w-primary);box-shadow:0 0 0 3px rgba(40,157,235,.12)}
.aichat-start-btn{width:100%;background:var(--ac-w-primary);color:#fff;border:none;border-radius:12px;padding:13px;font-size:16px;font-weight:700;cursor:pointer;transition:background .15s,transform .1s;margin-top:6px;font-family:inherit}
.aichat-start-btn:hover{filter:brightness(1.08)}
.aichat-start-btn:active{transform:scale(.98)}
.aichat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;scroll-behavior:smooth}
.aichat-messages::-webkit-scrollbar{width:4px}
.aichat-messages::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:4px}
.aichat-msg{display:flex;flex-direction:column;max-width:82%;animation:aichat-msg-in .22s cubic-bezier(.34,1.4,.64,1)}
@keyframes aichat-msg-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.aichat-msg.visitor{align-self:flex-end;align-items:flex-end}
.aichat-msg.operator,.aichat-msg.ai{align-self:flex-start;align-items:flex-start}
.aichat-bubble{padding:10px 14px;border-radius:18px;font-size:14px;line-height:1.55;word-break:break-word}
.aichat-msg.visitor .aichat-bubble{background:var(--ac-w-primary);color:#fff;border-bottom-right-radius:4px}
.aichat-msg.operator .aichat-bubble,.aichat-msg.ai .aichat-bubble{background:var(--ac-w-visitor);color:#111;border-bottom-left-radius:4px}
.aichat-msg.ai .aichat-bubble{background:#f0f4ff;border-left:3px solid var(--ac-w-primary)}
.aichat-msg-meta{font-size:11px;color:#9ca3af;margin-top:3px;padding:0 4px}
.aichat-msg-sender{font-size:11.5px;font-weight:600;color:#6b7280;margin-bottom:2px;padding:0 4px}
.aichat-msg.ai .aichat-msg-sender{color:var(--ac-w-primary)}
.aichat-typing-indicator{display:flex;align-items:center;gap:4px;padding:10px 14px;background:var(--ac-w-visitor);border-radius:18px;border-bottom-left-radius:4px;align-self:flex-start;animation:aichat-msg-in .22s ease}
.aichat-typing-dot{width:7px;height:7px;background:#9ca3af;border-radius:50%;animation:aichat-typing .9s infinite}
.aichat-typing-dot:nth-child(2){animation-delay:.15s}
.aichat-typing-dot:nth-child(3){animation-delay:.3s}
@keyframes aichat-typing{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-6px)}}
.aichat-footer{border-top:1px solid #f1f1f1;padding:12px 14px;position:relative;display:flex;align-items:flex-end;gap:8px;flex-shrink:0;background:#fff}
.aichat-input{flex:1;border:0;border-radius:12px;padding:9px 12px;font-size:14.5px;scrollbar-width:none;resize:none;outline:none;font-family:inherit;color:#111;min-height:40px;max-height:120px;line-height:1.5;transition:border-color .15s;}
.aichat-input:focus{border-color:0;}
.aichat-input::placeholder{color:#9ca3af}
.aichat-send-btn{width:40px;height:40px;border-radius:10px;background:transparent;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:filter .15s,transform .1s, background .15s, opacity .15s;flex-shrink:0}
.aichat-send-btn:hover{filter:brightness(1.1)}
.aichat-send-btn:active{transform:scale(.92)}
.aichat-send-btn svg{font-size:22px;width:24px;height:24px;}
.aichat-send-btn:not(:disabled) svg{color:var(--ac-w-primary);}
.aichat-send-btn:disabled{opacity:.5;pointer-events:none}
.aichat-powered{text-align:center;font-size:11px;color:#d1d5db;padding:6px 0 10px;flex-shrink:0;}
.aichat-offline-msg{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px 24px;text-align:center;gap:12px}
.aichat-offline-icon{font-size:40px;color:#d1d5db}
.aichat-offline-title{font-size:17px;font-weight:700;color:#374151}
.aichat-offline-sub{font-size:14px;color:#6b7280}
.aichat-offline-form{width:100%;margin-top:8px;display:flex;flex-direction:column;gap:10px}
.aichat-offline-form input{width:100%;border:1.5px solid #e5e7eb;border-radius:10px;padding:10px 14px;font-size:14.5px;color:#111;outline:none;font-family:inherit}
.aichat-offline-form input:focus{border-color:var(--ac-w-primary);box-shadow:0 0 0 3px rgba(40,157,235,.12)}
.aichat-offline-send{width:100%;background:var(--ac-w-primary);color:#fff;border:none;border-radius:12px;padding:12px;font-size:15px;font-weight:700;cursor:pointer;font-family:inherit;transition:filter .15s}
.aichat-offline-send:hover{filter:brightness(1.08)}
.aichat-toast{position:fixed;bottom:calc(var(--ac-w-size) + var(--ac-w-pos-bottom) + 80px);background:#1f2937;color:#fff;padding:12px 18px;border-radius:12px;font-size:14px;box-shadow:0 4px 20px rgba(0,0,0,.2);max-width:300px;animation:aichat-toast-in .3s ease;pointer-events:none;z-index:2147483601}
#app-aichat-root.pos-right .aichat-toast{right:0}
#app-aichat-root.pos-left .aichat-toast{left:0}
@keyframes aichat-toast-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.aichat-dark .aichat-window{background:#1f2937}
.aichat-dark .aichat-messages{background:#1f2937}
.aichat-dark .aichat-footer{background:#1f2937;border-color:#374151}
.aichat-dark .aichat-input{background:#374151;border-color:#4b5563;color:#f9fafb}
.aichat-dark .aichat-input:focus{background:#4b5563;border-color:var(--ac-w-primary)}
.aichat-dark .aichat-msg.operator .aichat-bubble,.aichat-dark .aichat-msg.ai .aichat-bubble{background:#374151;color:#f9fafb}
.aichat-dark .aichat-prechat{background:#1f2937}
.aichat-dark .aichat-prechat-title{color:#f9fafb}
.aichat-dark .aichat-field input,.aichat-dark .aichat-field select{background:#374151;border-color:#4b5563;color:#f9fafb}
.aichat-dark .aichat-powered{color:#4b5563}
.aichat-dark .aichat-offline-msg{background:#1f2937}
.aichat-dark .aichat-offline-title{color:#f9fafb}
@media(max-width:480px){
.aichat-window{width:calc(100vw - 24px);height:calc(100dvh - 120px);border-radius:16px 16px 0 0;bottom:calc(var(--ac-w-size) + 12px)}
#app-aichat-root.pos-right .aichat-window{right:0}
#app-aichat-root.pos-left .aichat-window{left:0}
}.aichat-img-wrap { border-radius: 10px; overflow: hidden; cursor: pointer; max-width: 200px; }
.aichat-msg-img { width: 100%; display: block; }
.aichat-reco-wrap { width: 100%; }
.aichat-reco-title { font-size: 12px; font-weight: 600; color: inherit; margin-bottom: 8px; opacity: .8; }
.aichat-reco-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.aichat-reco-card { display: flex; flex-direction: column; min-width: 100px; max-width: 120px; text-decoration: none; color: inherit; background: rgba(255,255,255,.15); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.aichat-msg.visitor .aichat-reco-card { background: rgba(0,0,0,.05); }
.aichat-reco-img { width: 100%; height: 80px; object-fit: cover; display: block; }
.aichat-reco-info { padding: 6px 8px; }
.aichat-reco-name { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aichat-reco-price { font-size: 11px; opacity: .75; margin-top: 2px; }
.aichat-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    max-width: 260px;
    transition: background .15s;
    cursor: pointer;
}
.aichat-msg.visitor .aichat-file-card {
    background: rgba(0,0,0,.04);
    border-color: rgba(0,0,0,.1);
    color: #111;
}
.aichat-file-card:hover {
    background: rgba(255,255,255,.22);
}
.aichat-msg.visitor .aichat-file-card:hover {
    background: rgba(0,0,0,.08);
}
.aichat-file-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    background: rgba(255,255,255,.15);
}
.aichat-msg.visitor .aichat-file-icon-wrap {
    background: rgba(0,0,0,.06);
}
.aichat-file-details { flex: 1; min-width: 0; }
.aichat-file-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.aichat-file-ext {
    font-size: 10px;
    opacity: .6;
    text-transform: uppercase;
    margin-top: 3px;
    letter-spacing: .5px;
}
.aichat-file-arrow {
    font-size: 13px;
    opacity: .5;
    flex-shrink: 0;
}
.aichat-img-wrap {
    border-radius: 12px;
    overflow: hidden;
    max-width: 220px;
    cursor: pointer;
    position: relative;
}
.aichat-msg-img {
    width: 100%;
    display: block;
    border-radius: 12px;
    transition: opacity .2s;
}
.aichat-msg-img:hover { opacity: .9; }
.aichat-loading-msgs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px;
}
.aichat-op-toast { position: absolute; bottom: 84px; background: #fff; border-radius: 16px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 0; max-width: 280px; opacity: 0; transform: translateY(8px) scale(.96); transition: opacity .22s ease, transform .22s ease; pointer-events: none; }
.aichat-op-toast.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.aichat-op-toast.tail-right { right: 16px; }
.aichat-op-toast.tail-left { left: 16px; }
.aichat-op-toast-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; cursor: pointer; }
.aichat-op-toast-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 700; }
.aichat-op-toast-body { flex: 1; min-width: 0; }
.aichat-op-toast-sender { font-size: 12px; font-weight: 700; color: #111827; margin-bottom: 2px; }
.aichat-op-toast-text { font-size: 13px; color: #4b5563; line-height: 1.4; }
.aichat-op-toast-close { background: none; border: none; padding: 2px; cursor: pointer; color: #9ca3af; flex-shrink: 0; display: flex; align-items: center; }
.aichat-op-toast-close:hover { color: #4b5563; }
.aichat-op-toast-tail { position: absolute; bottom: -7px; width: 16px; height: 16px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 6px rgba(0,0,0,.06); }
.aichat-op-toast.tail-right .aichat-op-toast-tail { right: 24px; }
.aichat-op-toast.tail-left .aichat-op-toast-tail { left: 24px; }
.aichat-op-toast-close svg{width:18px;height:18px;}
.aichat-dark .aichat-op-toast { background: #374151; }
.aichat-dark .aichat-op-toast-tail { background: #374151; }
.aichat-dark .aichat-op-toast-sender { color: #f9fafb; }
.aichat-dark .aichat-op-toast-text { color: #d1d5db; }
.aichat-dark .aichat-op-toast-close { color: #9ca3af; }

  .aichat-homepage {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
  }
   
  .aichat-hp-header {
    background: var(--ac-w-primary, #289deb);
    padding: 28px 20px 48px;
    flex-shrink: 0;
    position: relative;
  }
  .aichat-hp-header::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0; right: 0;
    height: 24px;
    background: #fff;
    border-radius: 18px 18px 0 0;
  }
  .aichat-hp-close { position: absolute; top: 14px; right: 14px; z-index: 2; }


  .aichat-hp-title-big {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
  }
  .aichat-hp-sub-big {
    color: rgba(255,255,255,.88);
    font-size: 16px;
    line-height: 1.5;
  }
  .aichat-hp-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px 4px;
    background: #fff;
  }
  .aichat-hp-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #111;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all .15s ease;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    box-sizing: border-box;
  }
  .aichat-hp-item:last-child { margin-bottom: 4px; }
  .aichat-hp-item:hover {
    border-color: var(--ac-w-primary, #289deb);
    box-shadow: 0 2px 8px rgba(40,157,235,.15);
    transform: translateY(-1px);
  }
  .aichat-hp-item:active { transform: translateY(0); }
   
  .aichat-hp-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f0f4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
  }
   
  .aichat-hp-info { flex: 1; min-width: 0; }
  .aichat-hp-title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aichat-hp-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aichat-hp-arrow {
    font-size: 16px;
    color: var(--ac-w-primary, #289deb);
    font-weight: 700;
    flex-shrink: 0;
    opacity: .7;
  }
  .aichat-hp-chat-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin: 4px 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    transition: all .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    flex-shrink: 0;
    width: calc(100% - 24px);
    box-sizing: border-box;
  }
  .aichat-hp-chat-btn-svg { width: 38px; height: 38px; border-radius: 50%; background: #f0f4ff; color: var(--ac-w-primary, #289deb); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }


  .aichat-hp-chat-btn:hover {
    border-color: var(--ac-w-primary, #289deb);
    box-shadow: 0 2px 8px rgba(40,157,235,.12);
  }
  .aichat-hp-chat-btn-content {
    display: flex;
    flex-direction: column;
    text-align: left;
  }
  .aichat-hp-chat-btn-label {
    font-size: 14px;
    font-weight: 700;
    color: #111;
  }
  .aichat-hp-chat-btn-sub {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    margin-top: 2px;
  }
  .aichat-hp-chat-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--ac-w-primary, #289deb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
  }
   
  .aichat-dark .aichat-hp-items { background: #1f2937; }
  .aichat-dark .aichat-hp-item { background: #374151; border-color: #4b5563; color: #f9fafb; }
  .aichat-dark .aichat-hp-item:hover { border-color: var(--ac-w-primary, #289deb); }
  .aichat-dark .aichat-hp-icon { background: #4b5563; }
  .aichat-dark .aichat-hp-title { color: #f9fafb; }
  .aichat-dark .aichat-hp-chat-btn { background: #374151; border-color: #4b5563; color: #f9fafb; }
  .aichat-dark .aichat-hp-header::after { background: #1f2937; }
  .aichat-dark .aichat-hp-chat-btn-svg { background: #4b5563; }


   
.aichat-back-btn {
  background: rgba(255, 255, 255, .18);
  border: 0;
  border-radius: 50px;
  cursor: pointer;
  color: #fff;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
  margin-right: 4px;
}
.aichat-back-btn:hover { background: rgba(255,255,255,.28); }
  .aichat-back-btn svg { flex-shrink: 0; }

  @media (max-width: 480px) {
    .aichat-hp-title-big { font-size: 20px; }
    .aichat-hp-header { padding: 22px 16px 18px; }
    .aichat-hp-item { padding: 12px 16px; }
  }
  .aichat-launcher-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse;
  }
  #app-aichat-root.pos-left .aichat-launcher-wrap {
    flex-direction: row;
  }
  .aichat-label-pill {
    background: #fff;
    color: #111;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
    white-space: nowrap;
    animation: aichat-msg-in .3s ease;
    cursor: pointer;
    user-select: none;
    transition: box-shadow .15s, transform .15s, opacity .2s ease;
  }
  .aichat-label-pill:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    transform: translateY(-1px);
  }
     #aichat-ecollect input:focus {
    border-color: var(--ac-w-primary) !important;
    outline: none;
    box-shadow: 0 0 0 3px rgba(40,157,235,.12);
  }
  #aichat-ecollect button[type="submit"]:hover {
    filter: brightness(1.08);
  }
  #aichat-ecollect-close:hover {
  background: rgba(0,0,0,.1) !important;
  color: #374151 !important;
}
#aichat-emoji-area { flex-shrink: 0; position: relative; z-index: 5; }
.aichat-emoji-fw { position: relative; }

  .aichat-emoji-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: transform .15s;
    display: flex;
    align-items: center;
  }
  .aichat-emoji-btn:hover { transform: scale(1.15); }

.aichat-emoji-fw {
  border-top: 1px solid #f3f4f6;
  background: #fff;
  max-height: 220px;
  display: flex;
  flex-direction: column;
}
.aichat-emoji-search-inp {
  border: none;
  border-bottom: 1px solid #f3f4f6;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  background: #fafafa;
}
.aichat-emoji-search-inp:focus { background: #fff; }
.aichat-emoji-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 6px 8px 8px;
}
.aichat-emoji-section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #9ca3af;
  margin: 6px 2px 3px;
}

  .aichat-emoji-search {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
    margin-bottom: 6px;
  }
  .aichat-emoji-search:focus { border-color: var(--ac-w-primary); }
  .aichat-emoji-grid-fw {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    max-height: 130px;
    overflow-y: auto;
  }
  .aichat-emoji-fw-item {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 3px;
    border-radius: 6px;
    transition: background .1s;
    line-height: 1;
     text-align: center;
  }
 
.aichat-emoji-cat-tabs {
  display: flex;
  gap: 2px;
  padding: 4px 8px 3px;
  border-bottom: 1px solid #f3f4f6;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}
.aichat-emoji-cat-tabs::-webkit-scrollbar { display: none; }
.aichat-emoji-cat-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background .1s;
  flex-shrink: 0;
  line-height: 1;
}
.aichat-emoji-cat-tab:hover { background: #f3f4f6; }
.aichat-emoji-cat-tab.active {
  background: var(--ac-w-primary, #289deb);
  border-radius: 6px;
}

  .aichat-emoji-fw-item:hover { background: #f3f4f6; }
  .aichat-dark .aichat-emoji-fw { background: #1f2937; border-color: #374151; }
.aichat-dark .aichat-emoji-search { background: #374151; border-color: #4b5563; color: #f9fafb; }
.aichat-dark .aichat-emoji-fw-item:hover { background: #374151; }
.aichat-dark .aichat-label-pill { background: #1f2937; color: #f9fafb; }
#_aichat_lb { font-family: inherit; }
.aichat-img-wrap { cursor: zoom-in !important; }
.aichat-msg-img { pointer-events: none; }
.aichat-msg.visitor .aichat-bubble a {
    color: rgba(255,255,255,.9);
    text-decoration: underline;
  }
  .aichat-msg.operator .aichat-bubble a,
  .aichat-msg.ai .aichat-bubble a {
    color: var(--ac-w-primary);
    text-decoration: underline;
  }
   
  @media (max-width: 480px) {
    .aichat-launcher-wrap { gap: 8px; }
    .aichat-label-pill { font-size: 13px; padding: 8px 14px; }
    .aichat-emoji-grid-fw { grid-template-columns: repeat(7, 1fr); }
  }
  .aichat-emoji-btn {
        position: absolute;
        bottom: -18px;
        left: 20px;
        color: #818181; 
  }
  #acSendBtn:disabled {
  cursor: not-allowed !important;
  color: var(--ac-text-3) !important;
}

.aichat-send-btn:disabled {
  color: #d1d5db !important;
  cursor: not-allowed !important;
}
.aichat-dark .aichat-emoji-fw { background: #1f2937; border-color: #374151; }
.aichat-dark .aichat-emoji-search-inp { background: #374151; color: #f9fafb; border-color: #4b5563; }
.aichat-dark .aichat-emoji-fw-item:hover { background: #374151; }
.aichat-dark .aichat-emoji-section { color: #6b7280; }
.aichat-bubble blockquote.aichat-quote {
  border-left: 3px solid rgba(255,255,255,.4);
  margin: 4px 0;
  padding: 4px 8px;
  font-style: italic;
  opacity: .9;
  border-radius: 0 4px 4px 0;
  background: rgba(0,0,0,.08);
}
.aichat-msg.operator .aichat-bubble blockquote.aichat-quote,
.aichat-msg.ai .aichat-bubble blockquote.aichat-quote {
  border-color: rgba(0,0,0,.2);
  background: rgba(0,0,0,.04);
  color: inherit;
}
.aichat-date-sep { display: flex; align-items: center; justify-content: center; margin: 14px 0; }
.aichat-date-sep span { background: #f3f4f6; color: #6b7280; font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.aichat-dark .aichat-date-sep span { background: #374151; color: #9ca3af; }