/* Rich message cards, shared by the widget and the operator panel.
   Colours come from --lc-* variables set by the host component. */

.lc-card {
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--lc-line);
  border-radius: 14px;
  background: var(--lc-surface);
  color: var(--lc-text);
  font-size: 13px;
  line-height: 1.4;
}

.lc-in { animation: lc-pop .32s cubic-bezier(.2, .8, .2, 1) both; }

@keyframes lc-pop {
  from { opacity: 0; transform: translateY(6px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.lc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 650;
}

.lc-muted { color: var(--lc-muted); font-weight: 450; font-size: 12px; }

.lc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--lc-line);
}

.lc-row:first-of-type { border-top: 0; padding-top: 2px; }
.lc-row b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.lc-row small { color: var(--lc-muted); font-size: 12px; }

.lc-pill {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.lc-ok { background: var(--lc-ok-bg); color: var(--lc-ok); }
.lc-wait { background: var(--lc-wait-bg); color: var(--lc-wait); }
.lc-bad { background: var(--lc-bad-bg); color: var(--lc-bad); }

.lc-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.lc-amount small { font-size: 12px; font-weight: 500; color: var(--lc-muted); }

.lc-steps {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.lc-steps li {
  position: relative;
  padding: 4px 0 4px 22px;
  color: var(--lc-muted);
  font-size: 12.5px;
}

.lc-steps li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--lc-line-strong);
  background: var(--lc-surface);
}

.lc-steps li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 19px;
  bottom: -5px;
  width: 2px;
  background: var(--lc-line);
}

.lc-steps li:last-child::after { display: none; }
.lc-steps li.done { color: var(--lc-text); }
.lc-steps li.done::before { background: var(--lc-ok); border-color: var(--lc-ok); }
.lc-steps li.done::after { background: var(--lc-ok); }
.lc-steps li.now { color: var(--lc-text); font-weight: 650; }
.lc-steps li.now::before { border-color: var(--lc-wait); background: var(--lc-wait); box-shadow: 0 0 0 4px var(--lc-wait-bg); }

.lc-progress {
  height: 8px;
  border-radius: 99px;
  background: var(--lc-track);
  overflow: hidden;
}

.lc-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--lc-accent);
  transform-origin: left;
  animation: lc-grow .9s cubic-bezier(.2, .8, .2, 1) both .15s;
}

@keyframes lc-grow { from { transform: scaleX(0); } }

.lc-split {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--lc-muted);
  font-variant-numeric: tabular-nums;
}

.lc-split b { color: var(--lc-text); }
.lc-balance .lc-split:first-child { margin-top: 0; }

.lc-check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 0;
}

.lc-check i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--lc-ok-bg);
}

.lc-check i::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid var(--lc-ok);
  border-bottom: 2px solid var(--lc-ok);
  transform: rotate(-45deg) translate(1px, -1px);
}

.lc-check.lc-missing i { background: var(--lc-bad-bg); }
.lc-check.lc-missing i::after { width: 2px; height: 8px; border: 0; background: var(--lc-bad); transform: none; }
.lc-check.lc-review i { background: var(--lc-wait-bg); }
.lc-check.lc-review i::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: var(--lc-wait); transform: none; }
.lc-check small { margin-left: auto; color: var(--lc-muted); font-size: 12px; }

.lc-btn {
  margin-top: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: var(--lc-accent);
  color: var(--lc-accent-ink);
  font: inherit;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
}

.lc-btn:hover { filter: brightness(1.06); }

.lc-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 3px 9px 3px 7px;
  border-radius: 7px;
  background: var(--lc-track);
  color: var(--lc-muted);
  font-size: 11.5px;
}

.lc-source::before {
  content: "";
  width: 10px;
  height: 12px;
  border-radius: 2px;
  border: 1.5px solid currentColor;
  opacity: .8;
}

.lc-stars { display: flex; gap: 4px; margin-top: 6px; }

.lc-stars button {
  border: 0;
  background: none;
  padding: 0 2px;
  font-size: 24px;
  line-height: 1;
  color: var(--lc-line-strong);
  cursor: pointer;
}

.lc-stars button.on, .lc-stars:hover button { color: #F2B544; }
.lc-stars button:hover ~ button { color: var(--lc-line-strong); }

.lc-handoff {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}

.lc-handoff b { display: block; margin-bottom: 2px; }
.lc-handoff small { color: var(--lc-muted); font-size: 12.5px; }

.lc-handoff-dot {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--lc-human);
}

.lc-handoff-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid var(--lc-human);
  opacity: .5;
  animation: lc-ping 1.6s ease-out infinite;
}

.lc-tone-rose .lc-handoff-dot, .lc-tone-rose .lc-handoff-dot::after { background: var(--lc-bad); border-color: var(--lc-bad); }
.lc-tone-rose .lc-handoff-dot::after { background: none; }
.lc-handoff-dot::after { background: none; }

@keyframes lc-ping {
  from { transform: scale(.6); opacity: .7; }
  to { transform: scale(1.6); opacity: 0; }
}

.lc-ticket small { display: block; margin-top: 4px; }
.lc-ticket .lc-split { margin-top: 0; color: var(--lc-text); font-weight: 600; }

.lc-file {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .14);
  text-align: left;
}

.lc-file i {
  width: 26px;
  height: 32px;
  flex: none;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 -9px 0 #E5484D;
}

.lc-file b { display: block; font-size: 12.5px; }
.lc-file small { font-size: 11.5px; opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .lc-in, .lc-progress i, .lc-handoff-dot::after { animation: none; }
}

/* images sent by the player, receipt reading */
.lc-image { margin: 6px 0 0; padding: 0; max-width: 220px; border-radius: 14px; overflow: hidden; border: 1px solid var(--lc-line); background: var(--lc-surface); }
.lc-image img { display: block; width: 100%; max-height: 260px; object-fit: cover; object-position: top; background: #fff; }
.lc-image figcaption { padding: 6px 10px; font-size: 11.5px; color: var(--lc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-receipt .lc-split { margin-top: 5px; }
.lc-receipt .lc-split:first-of-type { margin-top: 0; }
.lc-note { display: block; margin-top: 8px; }
