/* Public website — Summit live contact chat (UI/UX pro) */
:root {
  --sls-cc-navy: #0b3d66;
  --sls-cc-navy-deep: #08213f;
  --sls-cc-navy-mid: #0f4c81;
  --sls-cc-orange: #ea580c;
  --sls-cc-orange-hot: #f97316;
  --sls-cc-ink: #0f172a;
  --sls-cc-muted: #64748b;
  --sls-cc-line: #e2e8f0;
  --sls-cc-soft: #f1f5f9;
  --sls-cc-online: #059669;
  --sls-cc-online-soft: #ecfdf5;
  --sls-cc-offline: #94a3b8;
  --sls-cc-radius: 20px;
  --sls-cc-shadow: 0 24px 60px rgba(8, 33, 63, 0.28), 0 2px 8px rgba(15, 23, 42, 0.08);
  --sls-cc-font: Cairo, "Segoe UI", Tahoma, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  .sls-cc-dock,
  .sls-cc-fab,
  .sls-cc-greet,
  .sls-cc-panel,
  .sls-cc-icon-btn,
  .sls-cc-primary,
  .sls-cc-composer button,
  .sls-cc-field input,
  .sls-cc-field textarea {
    transition: none !important;
    animation: none !important;
  }
}

/* ——— Dock: greeting bubble + FAB ——— */
.sls-cc-dock {
  position: fixed;
  inset-inline-end: 1.1rem;
  bottom: 1.1rem;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  max-width: min(20.5rem, calc(100vw - 1.5rem));
  pointer-events: none;
}
.sls-cc-dock > * {
  pointer-events: auto;
}
.sls-cc-dock.is-hidden {
  display: none !important;
}

/* Linked greeting message (outside the green chat button) */
.sls-cc-greet {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px 16px 4px 16px;
  background: #fff;
  color: var(--sls-cc-ink);
  font-family: var(--sls-cc-font);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: start;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  animation: sls-cc-greet-in 0.35s ease-out;
}
html[dir='rtl'] .sls-cc-greet {
  border-radius: 16px 16px 16px 4px;
}
.sls-cc-greet:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}
.sls-cc-greet:focus-visible {
  outline: 3px solid rgba(5, 150, 105, 0.45);
  outline-offset: 2px;
}
.sls-cc-greet[hidden] {
  display: none !important;
}
.sls-cc-greet__text {
  display: block;
}
.sls-cc-greet__tail {
  position: absolute;
  inset-inline-end: 1.35rem;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-inline-end: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  transform: rotate(45deg);
  box-shadow: 2px 2px 4px rgba(15, 23, 42, 0.04);
}
@keyframes sls-cc-greet-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ——— FAB (short action label) ——— */
.sls-cc-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.78rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #c2410c 0%, var(--sls-cc-orange) 45%, var(--sls-cc-orange-hot) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.86rem;
  line-height: 1.25;
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.38);
  cursor: pointer;
  font-family: var(--sls-cc-font);
  text-align: start;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.sls-cc-fab:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(234, 88, 12, 0.42);
}
.sls-cc-fab:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(234, 88, 12, 0.45);
}
.sls-cc-fab.is-online {
  background: linear-gradient(135deg, #047857 0%, #059669 55%, #10b981 100%);
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.38);
}
.sls-cc-fab.is-online:hover {
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.45);
}
.sls-cc-fab__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
}
.sls-cc-fab.is-online .sls-cc-fab__dot {
  background: #bbf7d0;
  box-shadow: 0 0 0 4px rgba(187, 247, 208, 0.35);
  animation: sls-cc-pulse 1.8s ease-in-out infinite;
}
@keyframes sls-cc-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(187, 247, 208, 0.28); }
  50% { box-shadow: 0 0 0 6px rgba(187, 247, 208, 0.12); }
}
.sls-cc-fab__label {
  flex: 1 1 auto;
  min-width: 0;
}
.sls-cc-fab__icon {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sls-cc-fab__icon svg { width: 1.2rem; height: 1.2rem; fill: currentColor; }
.sls-cc-fab.is-hidden { display: none !important; }

/* ——— Panel shell ——— */
.sls-cc-panel {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 1rem;
  z-index: 2147483001;
  width: min(420px, calc(100vw - 1.25rem));
  height: min(680px, calc(100dvh - 1.4rem));
  display: flex;
  flex-direction: column;
  border-radius: var(--sls-cc-radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--sls-cc-shadow);
  font-family: var(--sls-cc-font);
  color: var(--sls-cc-ink);
  animation: sls-cc-rise 0.28s ease-out;
}
@keyframes sls-cc-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.sls-cc-panel[hidden] { display: none !important; }
.sls-cc-panel[dir="rtl"] { text-align: right; }
.sls-cc-panel[dir="ltr"] { text-align: left; }

/* ——— Header ——— */
.sls-cc-head {
  flex: 0 0 auto;
  padding: 1rem 1.05rem 1.05rem;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(249, 115, 22, 0.28) 0%, transparent 55%),
    linear-gradient(145deg, var(--sls-cc-navy-mid) 0%, var(--sls-cc-navy) 48%, var(--sls-cc-navy-deep) 100%);
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.sls-cc-head__brand {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: 0;
  flex: 1 1 auto;
}
.sls-cc-head__avatar {
  position: relative;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.22), rgba(255,255,255,0.06));
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
}
.sls-cc-head__avatar svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: #fff;
}
.sls-cc-head__live {
  position: absolute;
  inset-inline-end: -2px;
  bottom: -2px;
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
  background: var(--sls-cc-offline);
  border: 2px solid var(--sls-cc-navy);
  box-sizing: border-box;
}
.sls-cc-panel.is-online .sls-cc-head__live {
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}
.sls-cc-head__copy {
  min-width: 0;
  flex: 1 1 auto;
}
.sls-cc-head__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}
.sls-cc-head__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  color: #064e3b;
  background: var(--sls-cc-online-soft);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.sls-cc-head__status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--sls-cc-online);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}
.sls-cc-panel:not(.is-online) .sls-cc-head__status {
  color: #334155;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.45);
}
.sls-cc-panel:not(.is-online) .sls-cc-head__status::before {
  background: #94a3b8;
  box-shadow: none;
}
.sls-cc-head__acts {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}
.sls-cc-icon-btn {
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease;
}
.sls-cc-icon-btn:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}
.sls-cc-icon-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ——— Body ——— */
.sls-cc-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background:
    linear-gradient(180deg, #eef4fa 0%, #f8fafc 28%, #f8fafc 100%);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.sls-cc-body::-webkit-scrollbar { width: 6px; }
.sls-cc-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.sls-cc-or { display: none; }

/* ——— Gate form ——— */
.sls-cc-gate {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid var(--sls-cc-line);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sls-cc-gate__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--sls-cc-ink);
}
.sls-cc-gate__hint {
  margin: -0.2rem 0 0.15rem;
  font-size: 0.8rem;
  color: var(--sls-cc-muted);
  line-height: 1.5;
}
.sls-cc-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.32rem;
}
.sls-cc-field label .sls-cc-req {
  color: var(--sls-cc-orange);
  margin-inline-end: 0.15rem;
}
.sls-cc-field label .sls-cc-opt {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.7rem;
  margin-inline-start: 0.25rem;
}
.sls-cc-field input,
.sls-cc-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--sls-cc-ink);
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.sls-cc-field textarea { min-height: 5.75rem; resize: vertical; }
.sls-cc-field input::placeholder,
.sls-cc-field textarea::placeholder {
  color: #94a3b8;
}
.sls-cc-field input:hover,
.sls-cc-field textarea:hover {
  border-color: #94a3b8;
}
.sls-cc-field input:focus,
.sls-cc-field textarea:focus {
  outline: none;
  border-color: var(--sls-cc-orange);
  background: #fffaf7;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.16);
}
.sls-cc-error {
  margin: 0;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 1.1rem;
}
.sls-cc-primary {
  border: 0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #c2410c, var(--sls-cc-orange));
  color: #fff;
  font-weight: 800;
  font-size: 0.98rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.28);
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.sls-cc-primary:disabled {
  opacity: 0.65;
  cursor: wait;
  box-shadow: none;
}
.sls-cc-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.sls-cc-primary:focus-visible {
  outline: 3px solid rgba(234, 88, 12, 0.35);
  outline-offset: 2px;
}

/* ——— Thread ——— */
.sls-cc-thread {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1 1 auto;
  min-height: 0;
}
.sls-cc-bubble {
  max-width: 88%;
  border-radius: 16px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.sls-cc-bubble__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}
.sls-cc-bubble--visitor {
  align-self: flex-end;
  background: linear-gradient(145deg, var(--sls-cc-navy-mid), var(--sls-cc-navy));
  color: #fff;
  border-end-end-radius: 6px;
}
.sls-cc-bubble--bot,
.sls-cc-bubble--staff {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--sls-cc-line);
  color: var(--sls-cc-ink);
  border-end-start-radius: 6px;
}
.sls-cc-bubble--staff {
  border-color: #99f6e4;
  background: #f0fdfa;
}
.sls-cc-bubble--media {
  padding: 0.5rem 0.65rem 0.65rem;
}
.sls-cc-bubble__body--media {
  white-space: normal;
  line-height: 0;
}
.sls-cc-embed {
  display: block;
  max-width: min(100%, 220px);
  max-height: 180px;
  object-fit: contain;
  border-radius: 12px;
}
.sls-cc-embed--sticker {
  width: 112px;
  height: 112px;
  max-height: 112px;
}
.sls-cc-autolink {
  color: #0369a1;
  text-decoration: underline;
  word-break: break-all;
  pointer-events: auto;
}
.sls-cc-bubble--visitor .sls-cc-autolink {
  color: #e0f2fe;
}

/* ——— Composer ——— */
.sls-cc-composer {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--sls-cc-line);
  background: #fff;
}
.sls-cc-composer input {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font: inherit;
  font-size: 0.92rem;
  background: var(--sls-cc-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.sls-cc-composer input:focus {
  outline: none;
  background: #fff;
  border-color: var(--sls-cc-orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14);
}
.sls-cc-composer button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  background: linear-gradient(135deg, #c2410c, var(--sls-cc-orange));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: filter 0.18s ease, transform 0.18s ease;
}
.sls-cc-composer button:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.sls-cc-composer button:disabled { opacity: 0.6; cursor: wait; }
.sls-cc-composer button:focus-visible {
  outline: 3px solid rgba(234, 88, 12, 0.35);
  outline-offset: 2px;
}

/* Honeypot — visually + AT hidden (BUG-335). Do not use display:none alone — some bots skip those. */
.sls-cc-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 480px) {
  .sls-cc-dock {
    inset-inline-end: 0.75rem;
    bottom: 0.85rem;
    max-width: calc(100vw - 1.25rem);
  }
  .sls-cc-greet {
    font-size: 0.8rem;
    padding: 0.65rem 0.85rem;
  }
  .sls-cc-fab {
    padding: 0.72rem 0.9rem;
    font-size: 0.8rem;
    white-space: normal;
  }
  .sls-cc-panel {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    animation: none;
  }
  .sls-cc-head { border-radius: 0; padding-top: max(0.85rem, env(safe-area-inset-top)); }
  .sls-cc-composer { padding-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
}
