#drxchat-root, #drxchat-root * { box-sizing: border-box; }
#drxchat-root { position: fixed; z-index: 2147483000; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.4; color: #101828; }
#drxchat-root.drxchat-pos-right { right: 22px; bottom: 22px; }
#drxchat-root.drxchat-pos-left { left: 22px; bottom: 22px; }
#drxchat-root button, #drxchat-root input, #drxchat-root select, #drxchat-root textarea { font: inherit; }
.drxchat-launcher { position: relative; width: 66px; height: 66px; border: 0; border-radius: 22px; background: linear-gradient(135deg, var(--drxchat-primary), #111827); color: #fff; display: grid; place-items: center; box-shadow: 0 22px 50px rgba(36,107,254,.35); cursor: pointer; transition: transform .2s ease; }
.drxchat-launcher:hover { transform: translateY(-3px) scale(1.02); }
.drxchat-launcher svg { width: 31px; height: 31px; fill: currentColor; }
.drxchat-launcher-pulse { position: absolute; inset: -5px; border-radius: 26px; border: 2px solid rgba(36,107,254,.25); animation: drxchatPulse 1.9s infinite; }
@keyframes drxchatPulse { 0%{transform:scale(.9);opacity:.8} 100%{transform:scale(1.25);opacity:0} }

.drxchat-panel { display: none; position: absolute; bottom: 82px; width: 385px; max-width: calc(100vw - 28px); height: 640px; max-height: calc(100vh - 116px); background: #fff; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 90px rgba(2,8,23,.30); border: 1px solid rgba(148,163,184,.25); }
.drxchat-pos-right .drxchat-panel { right: 0; }
.drxchat-pos-left .drxchat-panel { left: 0; }
.drxchat-open .drxchat-panel { display: flex; flex-direction: column; animation: drxchatIn .18s ease both; }
@keyframes drxchatIn { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

.drxchat-header { min-height: 86px; padding: 18px; color: #fff; background: radial-gradient(circle at top left, rgba(255,255,255,.25), transparent 34%), linear-gradient(135deg, var(--drxchat-primary), #111827); display: flex; align-items: center; justify-content: space-between; }
.drxchat-agent-stack { display: flex; align-items: center; gap: 12px; }
.drxchat-avatar { width: 46px; height: 46px; border-radius: 18px; background: rgba(255,255,255,.16); padding: 4px; display: block; }
.drxchat-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 15px; }
.drxchat-agent-stack strong { display: block; font-size: 17px; }
.drxchat-agent-stack small { display: flex; align-items: center; gap: 6px; opacity: .9; }
.drxchat-agent-stack small i { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 5px rgba(34,197,94,.16); }
.drxchat-close { width: 34px; height: 34px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; cursor: pointer; }

.drxchat-body { flex: 1; overflow: hidden; background: linear-gradient(180deg, #f8fbff, #eef4ff); display: flex; flex-direction: column; }
.drxchat-intro { padding: 20px 20px 6px; }
.drxchat-intro h3 { margin: 0 0 4px; font-size: 22px; }
.drxchat-intro p { margin: 0; color: #64748b; font-size: 14px; }
.drxchat-start-form { padding: 14px 20px 20px; display: grid; gap: 10px; overflow: auto; }
.drxchat-start-form input, .drxchat-start-form select, .drxchat-start-form textarea { width: 100%; border: 1px solid #dbe5f0 !important; background: #fff !important; color: #111827 !important; border-radius: 16px !important; padding: 13px 14px !important; outline: none !important; box-shadow: 0 8px 22px rgba(15,23,42,.04) !important; min-height: 48px; }
.drxchat-start-form textarea { min-height: 92px; resize: vertical; }
.drxchat-start-form input:focus, .drxchat-start-form select:focus, .drxchat-start-form textarea:focus { border-color: var(--drxchat-primary) !important; box-shadow: 0 0 0 4px rgba(36,107,254,.11) !important; }
.drxchat-start-form button, .drxchat-composer button[type="submit"] { border: 0; border-radius: 16px; min-height: 50px; color: #fff; background: linear-gradient(135deg, var(--drxchat-primary), #111827); font-weight: 800; cursor: pointer; box-shadow: 0 15px 30px rgba(36,107,254,.22); }

.drxchat-waiting { margin: 18px; padding: 34px 22px; border-radius: 24px; background: #fff; text-align: center; box-shadow: 0 16px 40px rgba(15,23,42,.07); }
.drxchat-waiting strong { display: block; font-size: 18px; margin: 12px 0 6px; }
.drxchat-waiting p { margin: 0; color: #64748b; }
.drxchat-loader { display: flex; gap: 8px; justify-content: center; }
.drxchat-loader span { width: 10px; height: 10px; border-radius: 50%; background: var(--drxchat-primary); animation: drxchatBounce .8s infinite alternate; }
.drxchat-loader span:nth-child(2){ animation-delay:.15s; } .drxchat-loader span:nth-child(3){ animation-delay:.3s; }
@keyframes drxchatBounce { to { transform: translateY(-8px); opacity:.45; } }

.drxchat-room { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.drxchat-room-agent { margin: 12px 14px; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.82); display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 24px rgba(15,23,42,.06); }
.drxchat-room-agent img { width: 38px; height: 38px; border-radius: 14px; object-fit: cover; }
.drxchat-room-agent strong { display: block; font-size: 14px; }
.drxchat-room-agent small { color: #16a34a; font-size: 12px; }
.drxchat-messages { flex: 1; overflow: auto; padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.drxchat-msg { max-width: 82%; border-radius: 18px; padding: 10px 12px; font-size: 14px; box-shadow: 0 8px 18px rgba(15,23,42,.06); background: #fff; align-self: flex-start; word-break: break-word; }
.drxchat-msg-visitor { align-self: flex-end; background: linear-gradient(135deg, var(--drxchat-primary), #0f172a); color: #fff; border-bottom-right-radius: 6px; }
.drxchat-msg-system, .drxchat-msg-agent { border-bottom-left-radius: 6px; }
.drxchat-msg-name { font-size: 11px; opacity: .75; margin-bottom: 3px; font-weight: 800; }
.drxchat-msg small { display: block; margin-top: 5px; font-size: 10px; opacity: .7; }
.drxchat-msg a { color: inherit; text-decoration: underline; }
.drxchat-attachment { display: block; padding: 9px 10px; border-radius: 12px; background: rgba(0,0,0,.06); text-decoration: none !important; }
.drxchat-emoji-box { margin: 0 14px 8px; padding: 10px; background: #fff; border-radius: 18px; box-shadow: 0 12px 24px rgba(15,23,42,.08); display: flex; flex-wrap: wrap; gap: 8px; }
.drxchat-emoji-box button { border: 0; background: #f1f5f9; border-radius: 12px; width: 34px; height: 34px; cursor: pointer; }
.drxchat-composer { padding: 12px; display: flex; align-items: flex-end; gap: 7px; background: rgba(255,255,255,.92); border-top: 1px solid #e5edf7; }
.drxchat-composer textarea { flex: 1; min-height: 44px; max-height: 90px; resize: none; border: 1px solid #dbe5f0 !important; border-radius: 16px !important; padding: 11px 12px !important; outline: none !important; background: #fff !important; color: #111827 !important; }
.drxchat-composer button { border: 0; min-width: 40px; height: 44px; border-radius: 15px; cursor: pointer; background: #eef4ff; }
.drxchat-composer button[type="submit"] { min-width: 46px; height: 44px; min-height: 44px; padding: 0; }
.drxchat-brand { padding: 8px 12px; text-align: center; font-size: 11px; color: #64748b; background: #fff; border-top: 1px solid #eef2f7; }

@media (max-width: 520px) {
  #drxchat-root { left: 12px !important; right: 12px !important; bottom: 12px !important; }
  .drxchat-panel { position: fixed; inset: 10px 10px 88px 10px; width: auto; height: auto; max-width: none; max-height: none; border-radius: 26px; }
  .drxchat-launcher { width: 60px; height: 60px; margin-left: auto; }
  .drxchat-pos-left .drxchat-launcher { margin-left: 0; }
}

.drxchat-agent-shortcode{font-family:Inter,system-ui,sans-serif;padding:24px;border-radius:22px;background:#fff;box-shadow:0 18px 50px rgba(15,23,42,.08);border:1px solid #e6edf7}.drxchat-agent-button{display:inline-flex;padding:12px 18px;border-radius:14px;background:#246BFE;color:#fff!important;text-decoration:none;font-weight:800}
