:root {
  --max-accent: #5cb531;
}

#max-soporte-root { position: fixed; right: 20px; bottom: 20px; z-index: 99999; font-family: inherit; }

.max-bubble {
  width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--max-accent);
  background: #111 center/cover no-repeat; cursor: pointer; box-shadow: 0 10px 30px rgba(0,0,0,.28);
  transition: transform .18s ease; padding: 0; overflow: hidden;
}
.max-bubble:hover { transform: translateY(-4px) scale(1.04); }
.max-bubble img { width: 100%; height: 100%; object-fit: cover; display: block; }

.max-panel {
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 120px));
  background: #fff; border-radius: 18px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,.28); border: 1px solid rgba(0,0,0,.08);
}
.max-soporte-inline .max-panel { height: 520px; width: 100%; box-shadow: none; }

.max-head { background: #101010; color: #fff; display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.max-head img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #fff; border: 2px solid var(--max-accent); }
.max-head strong { font-size: 15px; display: block; line-height: 1.2; }
.max-head span { font-size: 12px; opacity: .75; }
.max-head button { margin-left: auto; background: transparent; border: 0; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }

.max-log { flex: 1; overflow-y: auto; padding: 14px; background: #f6f7f5; display: flex; flex-direction: column; gap: 10px; }
.max-msg { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.max-msg.bot { background: #fff; border: 1px solid #e6e8e4; align-self: flex-start; border-bottom-left-radius: 4px; color: #16181a; }
.max-msg.user { background: var(--max-accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.max-msg a { color: inherit; text-decoration: underline; }

.max-cards { display: flex; flex-direction: column; gap: 8px; align-self: flex-start; width: 86%; }
.max-card { display: flex; gap: 10px; background: #fff; border: 1px solid #e6e8e4; border-radius: 12px; padding: 8px; text-decoration: none; color: #16181a; }
.max-card img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #eee; }
.max-card b { font-size: 13px; display: block; }
.max-card small { color: var(--max-accent); font-weight: 700; }

.max-wa { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: #25d366; color: #fff !important;
  padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; }

.max-typing { font-size: 12px; color: #6b7280; padding-left: 4px; }

.max-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eceee9; background: #fff; }
.max-form input { flex: 1; border: 1px solid #dfe2dc; border-radius: 999px; padding: 10px 14px; font-size: 14px; outline: none; }
.max-form input:focus { border-color: var(--max-accent); }
.max-form button { background: var(--max-accent); color: #fff; border: 0; border-radius: 999px; padding: 0 16px; font-weight: 600; cursor: pointer; }
.max-form button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 480px) {
  #max-soporte-root { right: 12px; bottom: 12px; }
}
