/* ===== Support Widget ===== */
#supportWidget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: 'Inter', sans-serif; }

.sup-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #ff3a3a, #d75a33); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(255,58,58,0.4); transition: transform .2s, box-shadow .2s;
}
.sup-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(255,58,58,0.55); }

.sup-panel {
  position: absolute; bottom: 70px; right: 0; width: 360px; max-height: 520px;
  background: #1a1a1e; border: 1px solid #2a2a2e; border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6); animation: supIn .25s ease;
}
.sup-panel.hidden, .sup-reply-row.hidden, .sup-form.hidden, .sup-chat.hidden { display: none; }

@keyframes supIn { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }

.sup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: #141417; border-bottom: 1px solid #2a2a2e;
  font-weight: 700; font-size: 15px; color: #fff;
}
.sup-close {
  background: none; border: none; color: #888; font-size: 22px; cursor: pointer; line-height: 1;
  transition: color .15s;
}
.sup-close:hover { color: #fff; }

.sup-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* Form */
.sup-form { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sup-input {
  background: #222226; border: 1px solid #333; border-radius: 8px; padding: 10px 12px;
  color: #fff; font-size: 14px; font-family: inherit; outline: none; transition: border-color .15s;
}
.sup-input:focus { border-color: #ff3a3a; }
.sup-textarea { min-height: 80px; resize: vertical; }
.sup-submit {
  background: linear-gradient(135deg, #ff3a3a, #d75a33); border: none; border-radius: 8px;
  padding: 10px; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: filter .15s;
}
.sup-submit:hover { filter: brightness(1.1); }
.sup-submit:disabled { opacity: .5; cursor: not-allowed; }
.sup-submit.sm { padding: 8px 14px; font-size: 16px; }
.sup-err { color: #f87171; font-size: 13px; min-height: 18px; }

/* Chat */
.sup-chat { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.sup-messages { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.sup-msg { max-width: 85%; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.sup-msg.user { align-self: flex-end; background: #222226; border: 1px solid #333; }
.sup-msg.admin { align-self: flex-start; background: rgba(255,58,58,0.12); border: 1px solid rgba(255,58,58,0.25); }
.sup-msg-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 12px; color: #999; }
.sup-msg-head b { color: #ccc; }
.sup-msg-text { color: #eee; white-space: pre-wrap; word-break: break-word; }
.sup-reply-row { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #2a2a2e; }
.sup-reply-row .sup-input { flex: 1; }

/* Scrollbar */
.sup-messages::-webkit-scrollbar { width: 4px; }
.sup-messages::-webkit-scrollbar-track { background: transparent; }
.sup-messages::-webkit-scrollbar-thumb { background: rgba(255,58,58,0.4); border-radius: 4px; }
.sup-messages::-webkit-scrollbar-thumb:hover { background: rgba(255,58,58,0.7); }

/* Responsive */
@media (max-width: 480px) {
  .sup-panel { width: calc(100vw - 32px); right: -8px; max-height: 70vh; }
}
