/* ============================================================
   Lordpin Canlı Destek — flat widget (no gradient / glow)
   ============================================================ */

.lc-root {
  --lc-z: 8500;
  --lc-orange: #ff6b00;
  --lc-ink: #181b21;
  --lc-ink-soft: #5b6472;
  --lc-surface: #ffffff;
  --lc-surface-2: #f3f4f7;
  --lc-line: #e5e7eb;
  --lc-bubble-agent: #ffffff;
  --lc-bubble-sys: #6b7280;
  --lc-shadow: 0 8px 28px rgba(15, 23, 42, .12);
  --lc-radius: 16px;
  --lc-scroll: #c5cad3;
  --lc-scroll-hover: #9aa3b2;
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: var(--lc-z);
  font-family: var(--font, 'Plus Jakarta Sans', system-ui, sans-serif);
  color: var(--lc-ink);
  pointer-events: none;
  -webkit-font-smoothing: antialiased;
}
html[data-theme="dark"] .lc-root {
  --lc-ink: #eef1f7;
  --lc-ink-soft: #a8b2c4;
  --lc-surface: #1e2636;
  --lc-surface-2: #161c28;
  --lc-line: #2a3346;
  --lc-bubble-agent: #252e40;
  --lc-bubble-sys: #95a0b4;
  --lc-shadow: 0 10px 32px rgba(0, 0, 0, .45);
  --lc-scroll: #3a455c;
  --lc-scroll-hover: #5a6780;
}

.lc-root * { box-sizing: border-box; }
.lc-root button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.lc-root input,
.lc-root textarea {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}
.lc-root .lc-hit { pointer-events: auto; }

/* Custom scrollbars (Chrome / Safari / Edge) */
.lc-body,
.lc-msgs,
.lc-step {
  scrollbar-width: thin;
  scrollbar-color: var(--lc-scroll) transparent;
}
.lc-body::-webkit-scrollbar,
.lc-msgs::-webkit-scrollbar,
.lc-step::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.lc-body::-webkit-scrollbar-track,
.lc-msgs::-webkit-scrollbar-track,
.lc-step::-webkit-scrollbar-track {
  background: transparent;
}
.lc-body::-webkit-scrollbar-thumb,
.lc-msgs::-webkit-scrollbar-thumb,
.lc-step::-webkit-scrollbar-thumb {
  background: var(--lc-scroll);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.lc-body::-webkit-scrollbar-thumb:hover,
.lc-msgs::-webkit-scrollbar-thumb:hover,
.lc-step::-webkit-scrollbar-thumb:hover {
  background: var(--lc-scroll-hover);
  background-clip: padding-box;
}
.lc-body::-webkit-scrollbar-corner,
.lc-msgs::-webkit-scrollbar-corner {
  background: transparent;
}

/* —— FAB —— */
.lc-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--lc-orange) !important;
  color: #fff !important;
  display: grid;
  place-items: center;
  box-shadow: var(--lc-shadow);
  border: 1px solid rgba(0, 0, 0, .06) !important;
  position: relative;
  transition: background .15s, transform .15s;
}
.lc-fab:hover { background: #e85f00 !important; }
.lc-fab:active { transform: scale(.96); }
html[data-theme="dark"] .lc-fab {
  border-color: rgba(255, 255, 255, .1) !important;
}
.lc-fab i {
  font-size: 20px;
  color: #fff !important;
  transition: opacity .18s, transform .22s ease;
}
.lc-fab .lc-ico-x {
  position: absolute;
  opacity: 0;
  transform: rotate(-80deg) scale(.6);
}
.lc-root.open .lc-fab .lc-ico-chat {
  opacity: 0;
  transform: rotate(80deg) scale(.6);
}
.lc-root.open .lc-fab .lc-ico-x {
  opacity: 1;
  transform: none;
}

.lc-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--lc-surface);
}
.lc-badge.on { display: inline-flex; }

/* —— Panel —— */
.lc-panel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(392px, calc(100vw - 28px));
  height: min(600px, calc(100dvh - 108px));
  background: var(--lc-surface);
  border: 1px solid var(--lc-line);
  border-radius: var(--lc-radius);
  box-shadow: var(--lc-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transform-origin: bottom right;
  transition: opacity .18s ease, transform .22s ease, visibility .18s;
  pointer-events: none;
}
.lc-root.open .lc-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.lc-sheet-bar {
  display: none;
  justify-content: center;
  padding: 10px 0 2px;
  background: var(--lc-surface);
  flex-shrink: 0;
}
.lc-sheet-bar span {
  width: 36px;
  height: 4px;
  border-radius: 99px;
  background: var(--lc-line);
}

/* —— Header —— */
.lc-head {
  padding: 13px 14px;
  background: var(--lc-surface);
  color: var(--lc-ink);
  border-bottom: 1px solid var(--lc-line);
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.lc-head-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 107, 0, .12);
  color: var(--lc-orange);
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.lc-head-ico.has-photo {
  background: var(--lc-surface-2);
  border: 1px solid var(--lc-line);
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}
.lc-head-ico.has-photo img {
  display: none;
}
.lc-head-initial {
  font-size: 16px;
  font-weight: 800;
  color: var(--lc-orange);
}
.lc-head-text { flex: 1; min-width: 0; }
.lc-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  color: var(--lc-ink);
}
.lc-head-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lc-ink-soft);
}
.lc-head-status .lc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}
.lc-head-status.is-off .lc-dot { background: #94a3b8; }
.lc-head-status.is-wait .lc-dot {
  background: #f59e0b;
  animation: lcPulse 1.3s ease infinite;
}
@keyframes lcPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.lc-head-end {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--lc-ink-soft);
  display: grid;
  place-items: center;
  background: var(--lc-surface-2);
  border: 1px solid var(--lc-line) !important;
  transition: color .12s, border-color .12s;
}
.lc-head-end:hover {
  color: var(--lc-orange);
  border-color: var(--lc-orange) !important;
}
.lc-head-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--lc-ink-soft);
  display: grid;
  place-items: center;
  background: var(--lc-surface-2);
  border: 1px solid var(--lc-line) !important;
  transition: color .12s, border-color .12s;
}
.lc-head-close:hover {
  color: var(--lc-ink);
  border-color: var(--lc-orange) !important;
}
.lc-head-text + .lc-head-close { margin-left: auto; }

.lc-stars {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 4px 0 14px;
}
.lc-star {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #64748b;
  background: var(--lc-surface);
  border: 1px solid var(--lc-line) !important;
  font-size: 16px;
  transition: color .12s, border-color .12s, background .12s;
}
.lc-star.on {
  color: #f59e0b;
  border-color: #f59e0b !important;
  background: rgba(245, 158, 11, .1);
}
.lc-rate-note {
  text-align: left;
  min-height: 64px;
  resize: vertical;
  margin-bottom: 10px !important;
}
.lc-rate-skip {
  margin-top: 10px;
  background: transparent !important;
  border: 0 !important;
  color: var(--lc-ink-soft) !important;
  font-weight: 650;
  cursor: pointer;
  padding: 8px;
}
.lc-rate .lc-btn { margin-top: 4px; }

.lc-pcards {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.lc-pcard {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 8px;
  border-radius: 12px;
  background: var(--lc-surface-2);
  border: 1px solid var(--lc-line) !important;
  color: var(--lc-ink);
  transition: border-color .12s;
}
.lc-bubble.agent .lc-pcard {
  background: var(--lc-surface-2);
}
html[data-theme="dark"] .lc-bubble.agent .lc-pcard {
  background: #1a2130;
}
.lc-pcard:hover { border-color: var(--lc-orange) !important; }
.lc-pcard-img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--lc-line);
}
.lc-pcard-ph {
  display: grid;
  place-items: center;
  color: var(--lc-ink-soft);
  font-size: 18px;
}
.lc-pcard-name {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc-pcard-meta {
  font-size: 11px;
  color: var(--lc-ink-soft);
  margin-top: 2px;
}
.lc-pcard-price {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--lc-orange);
}
.lc-pcard-cta {
  font-size: 11px;
  font-weight: 800;
  color: var(--lc-orange);
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 107, 0, .1);
  white-space: nowrap;
}

/* —— Body —— */
.lc-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: var(--lc-surface-2);
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.lc-step {
  display: none;
  animation: lcIn .2s ease;
  padding: 16px;
  height: 100%;
  overflow: auto;
}
.lc-step.on { display: flex; flex-direction: column; }
@keyframes lcIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.lc-intro { margin: 0 0 14px; }
.lc-intro h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--lc-ink);
}
.lc-intro p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--lc-ink-soft);
}

.lc-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--lc-ink-soft);
  margin: 0 0 6px;
}
.lc-input {
  width: 100%;
  padding: 12px 13px;
  border-radius: 11px;
  border: 1px solid var(--lc-line);
  background: var(--lc-surface);
  color: var(--lc-ink);
  margin-bottom: 11px;
  outline: none;
  font-size: 15px;
  transition: border-color .12s;
}
.lc-input:focus { border-color: var(--lc-orange); }
.lc-input::placeholder { color: #9aa3b2; }

.lc-cats { display: grid; gap: 8px; margin-top: 2px; }
.lc-cat {
  text-align: left;
  padding: 12px 13px;
  border-radius: 12px;
  background: var(--lc-surface);
  border: 1px solid var(--lc-line) !important;
  font-weight: 700;
  font-size: 14px;
  color: var(--lc-ink);
  display: flex;
  align-items: center;
  gap: 11px;
  transition: border-color .12s, background .12s;
}
.lc-cat:hover {
  border-color: var(--lc-orange) !important;
  background: rgba(255, 107, 0, .05);
}
.lc-cat-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 107, 0, .1);
  color: var(--lc-orange);
  display: grid;
  place-items: center;
  font-size: 13px;
  flex: 0 0 34px;
}
.lc-cat > span:not(.lc-cat-ico) { flex: 1; min-width: 0; }
.lc-cat .lc-cat-arrow {
  color: var(--lc-ink-soft);
  font-size: 11px;
  opacity: .65;
  flex: 0 0 auto;
  margin-left: auto;
}

.lc-btn {
  width: 100%;
  margin-top: auto;
  padding: 13px 14px;
  border-radius: 11px;
  background: var(--lc-orange) !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 14.5px;
  transition: background .12s;
}
.lc-btn:hover { background: #e85f00 !important; }
.lc-btn:disabled { opacity: .5; cursor: not-allowed; }

.lc-rules {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--lc-line);
  border-radius: 12px;
  background: var(--lc-surface-2);
}
.lc-rules-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lc-rules-list li {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--lc-muted, #a8b0c0);
}
.lc-rules-note {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--lc-muted, #a8b0c0);
  pointer-events: none;
  user-select: none;
}

.lc-err {
  color: #ef4444;
  font-size: 12.5px;
  font-weight: 650;
  margin: 2px 0 10px;
  min-height: 16px;
}

/* —— Empty —— */
.lc-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 22px;
}
.lc-empty-ico {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 107, 0, .1);
  color: var(--lc-orange);
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.lc-empty-ico.is-muted {
  background: rgba(148, 163, 184, .14);
  color: var(--lc-ink-soft);
}
.lc-empty-ico.is-bad {
  background: rgba(239, 68, 68, .1);
  color: #ef4444;
}
.lc-empty h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--lc-ink);
}
.lc-empty p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--lc-ink-soft);
  max-width: 280px;
}
.lc-empty .lc-hours-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--lc-surface);
  border: 1px solid var(--lc-line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--lc-ink);
  margin-bottom: 16px;
}
.lc-empty .lc-hours-pill i { color: var(--lc-orange); }
.lc-empty a.lc-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 11px;
  background: var(--lc-surface);
  border: 1px solid var(--lc-line);
  color: var(--lc-ink);
  font-weight: 750;
  font-size: 13.5px;
  text-decoration: none;
}
.lc-empty a.lc-link-btn:hover {
  border-color: var(--lc-orange);
  color: var(--lc-orange);
}

/* —— Chat —— */
.lc-chat-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.lc-msgs {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--lc-surface-2);
}
.lc-bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}
.lc-bubble.pending { opacity: .72; }
.lc-bubble a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
  font-weight: 650;
}
.lc-bubble.visitor {
  align-self: flex-end;
  background: var(--lc-orange);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.lc-bubble.visitor a { color: #fff; }
.lc-bubble.agent {
  align-self: flex-start;
  background: var(--lc-bubble-agent);
  color: var(--lc-ink);
  border: 1px solid var(--lc-line);
  border-bottom-left-radius: 4px;
}
.lc-bubble.agent a { color: var(--lc-orange); }
.lc-bubble.system {
  align-self: center;
  max-width: 94%;
  background: transparent;
  color: var(--lc-bubble-sys);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  padding: 5px 8px;
  border: 0;
}
.lc-typing {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 12px 8px;
  padding: 10px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--lc-bubble-agent);
  border: 1px solid var(--lc-line);
  width: fit-content;
  max-width: 78%;
  flex-shrink: 0;
}
.lc-typing.on { display: inline-flex; }
.lc-typing-label {
  font-size: 12px;
  color: var(--lc-ink-soft);
  font-weight: 650;
}
.lc-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.lc-typing-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lc-ink-soft);
  opacity: .35;
  animation: lcTypingDot 1.1s infinite ease-in-out;
}
.lc-typing-dots i:nth-child(2) { animation-delay: .15s; }
.lc-typing-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes lcTypingDot {
  0%, 80%, 100% { opacity: .28; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
.lc-meta {
  display: block;
  font-size: 10.5px;
  opacity: .7;
  margin-top: 4px;
  font-weight: 600;
}

.lc-compose-note {
  padding: 8px 12px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--lc-ink-soft);
  background: var(--lc-surface);
  flex-shrink: 0;
  font-weight: 600;
}
.lc-compose-note:empty { display: none; }

.lc-compose {
  display: flex;
  gap: 8px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--lc-line);
  background: var(--lc-surface);
  flex-shrink: 0;
  align-items: flex-end;
}
.lc-compose textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 110px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--lc-line);
  background: var(--lc-surface-2);
  color: var(--lc-ink);
  font: inherit;
  font-size: 14.5px;
  line-height: 1.4;
  outline: none;
}
.lc-compose textarea:focus {
  border-color: var(--lc-orange);
  background: var(--lc-surface);
}
.lc-compose textarea::placeholder { color: #9aa3b2; }
.lc-compose textarea:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.lc-send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
  background: var(--lc-orange) !important;
  color: #fff !important;
  display: grid;
  place-items: center;
  border: 0 !important;
  transition: background .12s, opacity .12s;
}
.lc-send:hover { background: #e85f00 !important; }
.lc-send:disabled { opacity: .4; }
.lc-send i { color: #fff !important; font-size: 14px; }

/* —— Mobile sheet —— */
@media (max-width: 820px) {
  .lc-root {
    right: max(14px, env(safe-area-inset-right));
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
  .lc-root.open {
    right: 0;
    left: 0;
    bottom: 0;
  }
  .lc-root.open .lc-fab {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: calc(var(--lc-z) + 2);
  }
  .lc-sheet-bar { display: flex; }
  .lc-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(92dvh, 720px);
    max-height: calc(100dvh - 8px);
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    transform: translateY(110%);
  }
  .lc-root.open .lc-panel { transform: none; }
  .lc-bubble { font-size: 15px; max-width: 88%; }
  .lc-compose textarea { font-size: 16px; }
}

/* Göz overlay — sohbet panelinin altında, sayfa üzerinde */
.lc-eye-overlay {
  position: fixed;
  z-index: 8400;
  pointer-events: none;
  box-sizing: border-box;
  border-radius: 10px;
  transition: top .12s ease, left .12s ease, width .12s ease, height .12s ease;
}
.lc-eye-ring {
  position: absolute;
  inset: 0;
  border: 2.5px solid #ff6b00;
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(255,107,0,.22), 0 8px 24px rgba(255,107,0,.18);
  animation: lcEyePulse 1.6s ease-in-out infinite;
}
.lc-eye-label {
  position: absolute;
  left: 0;
  top: -28px;
  max-width: min(240px, 70vw);
  padding: 4px 10px;
  border-radius: 8px;
  background: #ff6b00;
  color: #fff;
  font: 700 12px/1.3 system-ui, -apple-system, Segoe UI, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.lc-eye-overlay.is-missing .lc-eye-ring {
  border-style: dashed;
  opacity: .55;
}
@keyframes lcEyePulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.012); opacity: .88; }
}
html[data-theme="dark"] .lc-eye-label {
  box-shadow: 0 4px 16px rgba(0,0,0,.45);
}
