/* =========================================================
   LiveChat — floating widget (black + orange / Call of Duty)
   ========================================================= */
#lc-widget {
  --lc-bg:        #0d0d0f;
  --lc-bg-2:      #17181c;
  --lc-line:      #25272d;
  --lc-text:      #f1f1f3;
  --lc-muted:     #9aa0a6;
  --lc-accent:    #ff7a00;
  --lc-accent-2:  #ff9a3d;
  --lc-visitor:   #ff7a00;
  --lc-admin:     #1f2127;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483600;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--lc-text);
}
/* ---------- Toggle button ---------- */
#lc-toggle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent-2));
  box-shadow: 0 10px 24px rgba(255, 122, 0, 0.45), 0 4px 10px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
#lc-toggle:hover { transform: translateY(-2px) scale(1.04); }
#lc-toggle:active { transform: scale(.96); }
.lc-badge {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #ff2d2d;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--lc-bg);
}
/* ---------- Panel ---------- */
#lc-panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--lc-bg);
  border: 1px solid var(--lc-line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0;
  transform: translateY(12px) scale(.96);
  pointer-events: none;
  transition: opacity .2s ease, transform .22s cubic-bezier(.2,.8,.2,1);
}
#lc-widget.lc-open #lc-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#lc-widget.lc-open #lc-toggle { transform: rotate(8deg) scale(.92); }
/* ---------- Header ---------- */
.lc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a1b1f, #0f1013);
  border-bottom: 1px solid var(--lc-line);
}
.lc-header-info { display: flex; align-items: center; gap: 12px; }
.lc-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent-2));
  color: #111;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  letter-spacing: .5px;
}
.lc-title { font-weight: 700; font-size: 15px; }
.lc-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--lc-muted);
  margin-top: 2px;
}
.lc-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 0 3px rgba(46,204,113,.18);
}
#lc-close {
  background: transparent;
  border: none;
  color: var(--lc-muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
#lc-close:hover { color: #fff; background: rgba(255,255,255,.06); }
/* ---------- Messages ---------- */
.lc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background:
    radial-gradient(1200px 200px at 50% -10%, rgba(255,122,0,.06), transparent 60%),
    var(--lc-bg);
  scrollbar-width: thin;
  scrollbar-color: #2a2c33 transparent;
}
.lc-messages::-webkit-scrollbar { width: 6px; }
.lc-messages::-webkit-scrollbar-thumb { background: #2a2c33; border-radius: 3px; }
.lc-welcome {
  text-align: center;
  padding: 26px 12px;
  color: var(--lc-muted);
}
.lc-welcome-emoji { font-size: 36px; margin-bottom: 8px; }
.lc-welcome h3 { margin: 0 0 6px; color: var(--lc-text); font-size: 17px; }
.lc-welcome p  { margin: 0; font-size: 13px; line-height: 1.5; }
.lc-row {
  display: flex;
  max-width: 85%;
  animation: lc-pop .18s ease-out;
}
.lc-row.visitor { align-self: flex-end; justify-content: flex-end; }
.lc-row.admin   { align-self: flex-start; }
.lc-bubble {
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-wrap: break-word;
  white-space: pre-wrap;
  position: relative;
}
.lc-row.visitor .lc-bubble {
  background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent-2));
  color: #1a1208;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.lc-row.admin .lc-bubble {
  background: var(--lc-admin);
  color: var(--lc-text);
  border: 1px solid var(--lc-line);
  border-bottom-left-radius: 4px;
}
.lc-meta {
  font-size: 11px;
  color: var(--lc-muted);
  margin-top: 4px;
  padding: 0 6px;
  display: flex;
  gap: 4px;
  align-items: center;
}
.lc-row.visitor .lc-meta { justify-content: flex-end; }
.lc-typing {
  display: inline-flex; gap: 4px; padding: 10px 14px;
  background: var(--lc-admin);
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.lc-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--lc-muted);
  animation: lc-blink 1.2s infinite ease-in-out;
}
.lc-typing span:nth-child(2) { animation-delay: .2s; }
.lc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes lc-blink {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-2px); }
}
@keyframes lc-pop {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0);   }
}
/* ---------- Form ---------- */
.lc-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--lc-line);
  background: var(--lc-bg-2);
}
#lc-input {
  flex: 1;
  background: #0b0c0f;
  color: var(--lc-text);
  border: 1px solid var(--lc-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#lc-input::placeholder { color: #6b7079; }
#lc-input:focus {
  border-color: var(--lc-accent);
  box-shadow: 0 0 0 3px rgba(255,122,0,.18);
}
#lc-send {
  width: 42px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--lc-accent), var(--lc-accent-2));
  color: #1a1208;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s ease, filter .12s ease;
}
#lc-send:hover  { filter: brightness(1.08); }
#lc-send:active { transform: scale(.94); }
#lc-send:disabled { opacity: .5; cursor: not-allowed; }
.lc-footer {
  text-align: center;
  font-size: 11px;
  color: var(--lc-muted);
  padding: 6px 10px 8px;
  background: var(--lc-bg-2);
  border-top: 1px solid var(--lc-line);
}
/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  #lc-widget {
    right: 14px !important;
    bottom: 14px !important;
    z-index: 2147483647 !important;
    isolation: isolate;
  }
  #lc-toggle {
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    pointer-events: auto !important;
  }
  #lc-panel {
    width: calc(100vw - 28px);
    height: calc(100vh - 100px);
    bottom: 72px;
  }
}