.crobot { --crobot-color: #2f6b3a; position: fixed; bottom: 20px; z-index: 999999; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #1f2937; }
.crobot-right { right: 20px; }
.crobot-left { left: 20px; }
.crobot *, .crobot *::before, .crobot *::after { box-sizing: border-box; }

.crobot-launcher { position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--crobot-color); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.22); transition: transform .15s; padding: 0; }
.crobot-launcher:hover { transform: scale(1.06); }
.crobot-launcher:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
.crobot-left .crobot-launcher { margin-right: auto; }
.crobot-right .crobot-launcher { margin-left: auto; }
.crobot-badge { display: none; position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #dc2626; color: #fff; font-size: 12px; font-weight: 700; align-items: center; justify-content: center; }

.crobot-panel { display: none; flex-direction: column; width: 370px; height: min(600px, calc(100vh - 110px)); margin-bottom: 14px; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.crobot-open .crobot-panel { display: flex; animation: crobot-in .18s ease-out; }
@keyframes crobot-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.crobot-head { display: flex; align-items: center; gap: 4px; padding: 12px 10px 12px 16px; background: var(--crobot-color); color: #fff; }
.crobot-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crobot-titles strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crobot-titles span { font-size: 12px; opacity: .85; }
.crobot-icon { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 0; }
.crobot-icon:hover { background: rgba(255,255,255,.18); color: #fff; }

.crobot-banner { display: none; padding: 8px 14px; background: #fef3c7; color: #78350f; font-size: 13px; }
.crobot-banner a { color: #78350f; font-weight: 600; }

.crobot-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f8f6; }
.crobot-msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.crobot-msg a { color: inherit; text-decoration: underline; }
.crobot-bot { align-self: flex-start; background: #fff; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.crobot-bot a { color: var(--crobot-color); }
.crobot-owner { align-self: flex-start; background: #ecfdf5; border: 1px solid #a7f3d0; border-bottom-left-radius: 4px; }
.crobot-owner small { display: block; font-size: 11px; font-weight: 700; color: #047857; margin-bottom: 2px; }
.crobot-visitor { align-self: flex-end; background: var(--crobot-color); color: #fff; border-bottom-right-radius: 4px; }
.crobot-pending { opacity: .65; }
.crobot-system { align-self: center; max-width: 95%; background: none; padding: 2px 8px; font-size: 12px; color: #6b7280; text-align: center; }
.crobot-error { color: #b91c1c; }
.crobot-action { align-self: flex-start; padding: 0; background: none; }
.crobot-wa-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 20px; background: #25d366; color: #fff !important; font-weight: 600; text-decoration: none !important; }
.crobot-wa-btn:hover { background: #1ebe5b; }

.crobot-typing { display: flex; gap: 4px; padding: 12px 14px; }
.crobot-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9ca3af; animation: crobot-dot 1.2s infinite; }
.crobot-typing span:nth-child(2) { animation-delay: .15s; }
.crobot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes crobot-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.crobot-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px; border-top: 1px solid #e5e7eb; background: #fff; }
.crobot-form textarea { flex: 1; resize: none; border: 1px solid #d1d5db; border-radius: 20px; padding: 9px 14px; font: inherit; font-size: 15px; line-height: 1.35; max-height: 120px; outline: none; background: #fff; color: #1f2937; margin: 0; min-height: 40px; }
.crobot-form textarea:focus { border-color: var(--crobot-color); }
.crobot-send { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: var(--crobot-color); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.crobot-send:disabled { opacity: .5; cursor: default; }
.crobot-foot { padding: 4px 12px 8px; font-size: 11px; color: #9ca3af; text-align: center; background: #fff; }
.crobot-foot a { color: #6b7280; }

@media (max-width: 480px) {
	.crobot { bottom: 14px; }
	.crobot-right { right: 14px; }
	.crobot-left { left: 14px; }
	.crobot-open { top: 0; left: 0; right: 0; bottom: 0; }
	.crobot-open .crobot-panel { width: 100%; height: 100%; margin: 0; border-radius: 0; }
	.crobot-open .crobot-launcher { display: none; }
	.crobot-form textarea { font-size: 16px; }
}
