/* ==========================================================
   365jeet-style Live Chat Support  (standalone, no rebuild)
   ========================================================== */
:root {
  --jsup-bg: #131b2a;
  --jsup-bg-2: #1b2436;
  --jsup-line: rgba(255, 255, 255, 0.08);
  --jsup-red: #ea1a4c;
  --jsup-red-2: #ff3f6c;
  --jsup-gold: #f5c451;
  --jsup-text: #eef2f8;
  --jsup-muted: #8d9ab1;
}

#jsup-fab {
  position: fixed;
  right: 14px;
  bottom: 92px;
  z-index: 2147483000;
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(160deg, var(--jsup-red-2), var(--jsup-red));
  box-shadow: 0 10px 24px rgba(234, 26, 76, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease;
}
#jsup-fab:active { transform: scale(0.93); }
#jsup-fab svg { width: 26px; height: 26px; fill: #fff; }
#jsup-fab .jsup-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--jsup-gold);
  box-shadow: 0 0 0 2px var(--jsup-bg);
}

#jsup-mask {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  background: rgba(5, 8, 14, 0.72);
  backdrop-filter: blur(2px);
  display: none;
  align-items: flex-end;
  justify-content: center;
}
#jsup-mask.jsup-open { display: flex; }

#jsup-modal {
  width: 100%;
  max-width: 430px;
  height: 88vh;
  max-height: 720px;
  background: var(--jsup-bg);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: jsup-up 0.24s ease;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--jsup-text);
}
@keyframes jsup-up { from { transform: translateY(24px); opacity: 0.4; } to { transform: none; opacity: 1; } }

.jsup-head {
  background: linear-gradient(135deg, var(--jsup-red-2), var(--jsup-red));
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.jsup-head .jsup-av {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--jsup-gold);
}
.jsup-head .jsup-av svg { width: 20px; height: 20px; fill: #fff; }
.jsup-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: #fff; }
.jsup-head p { margin: 2px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, 0.85); display: flex; align-items: center; gap: 5px; }
.jsup-head p i { width: 7px; height: 7px; border-radius: 50%; background: #35e08a; display: inline-block; }
.jsup-close {
  margin-left: auto; background: rgba(0, 0, 0, 0.18); border: none; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 17px; line-height: 1;
}

.jsup-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 6px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(234, 26, 76, 0.09), transparent 60%),
    var(--jsup-bg);
}
.jsup-day { text-align: center; font-size: 11px; color: var(--jsup-muted); margin: 6px 0 12px; }

.jsup-row { display: flex; margin-bottom: 10px; }
.jsup-row.me { justify-content: flex-end; }
.jsup-bubble {
  max-width: 78%;
  padding: 9px 12px;
  font-size: 13.5px;
  line-height: 1.45;
  border-radius: 14px;
  word-break: break-word;
  white-space: pre-wrap;
}
.jsup-row.them .jsup-bubble {
  background: var(--jsup-bg-2);
  border: 1px solid var(--jsup-line);
  border-bottom-left-radius: 4px;
}
.jsup-row.me .jsup-bubble {
  background: linear-gradient(135deg, var(--jsup-red-2), var(--jsup-red));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.jsup-time { display: block; margin-top: 4px; font-size: 10px; opacity: 0.65; }

.jsup-quick {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 8px 12px; border-top: 1px solid var(--jsup-line);
  background: var(--jsup-bg);
}
.jsup-quick::-webkit-scrollbar { display: none; }
.jsup-quick button {
  flex: 0 0 auto; cursor: pointer;
  background: var(--jsup-bg-2); color: var(--jsup-gold);
  border: 1px solid rgba(245, 196, 81, 0.35);
  border-radius: 999px; padding: 6px 12px; font-size: 12px;
}

.jsup-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--jsup-line);
  background: var(--jsup-bg);
}
.jsup-foot input {
  flex: 1; height: 42px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--jsup-line);
  background: var(--jsup-bg-2); color: var(--jsup-text); font-size: 14px; outline: none;
}
.jsup-foot input::placeholder { color: var(--jsup-muted); }
.jsup-foot input:focus { border-color: rgba(234, 26, 76, 0.6); }
.jsup-send {
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--jsup-red-2), var(--jsup-red));
  display: flex; align-items: center; justify-content: center;
}
.jsup-send:disabled { opacity: 0.5; }
.jsup-send svg { width: 18px; height: 18px; fill: #fff; }

.jsup-note { text-align: center; font-size: 11.5px; color: var(--jsup-muted); padding: 10px 16px; }
.jsup-note a { color: var(--jsup-gold); text-decoration: none; }

@media (min-width: 640px) {
  #jsup-mask { align-items: center; }
  #jsup-modal { border-radius: 18px; height: 640px; }
}
