/* Neon WIN / LOSS trade share cards — fixed 1536×1024 composition, scaled in preview. */

.wtsc-stage {
  --wtsc-scale: 1;
  position: relative;
  width: 100%;
  min-width: 480px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 10px;
}

@media (max-width: 960px) {
  .wtsc-stage {
    min-width: 0;
    max-width: 100%;
  }
}

.wtsc {
  --wtsc-accent: #39ff6a;
  --wtsc-accent-soft: rgba(57, 255, 106, 0.16);
  --wtsc-accent-mid: rgba(57, 255, 106, 0.42);
  --wtsc-accent-glow: rgba(57, 255, 106, 0.55);
  --wtsc-accent-glow-soft: rgba(57, 255, 106, 0.28);
  --wtsc-accent-deep: rgba(12, 60, 28, 0.55);
  --wtsc-stroke: rgba(180, 255, 200, 0.18);
  --wtsc-green: var(--wtsc-accent);
  --wtsc-green-soft: var(--wtsc-accent-soft);
  --wtsc-green-mid: var(--wtsc-accent-mid);
  --wtsc-purple: #a78bfa;
  --wtsc-ink: #f4f7fb;
  --wtsc-muted: rgba(214, 222, 234, 0.62);
  --wtsc-glass: rgba(8, 12, 18, 0.62);
  --wtsc-glass-border: rgba(57, 255, 106, 0.22);
  --wtsc-card-border: rgba(57, 255, 106, 0.28);
  --wtsc-panel-border: rgba(57, 255, 106, 0.18);
  --wtsc-w: 1536px;
  --wtsc-h: 1024px;

  position: relative;
  width: var(--wtsc-w);
  height: var(--wtsc-h);
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--wtsc-card-border);
  background: #05070c;
  color: var(--wtsc-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 24px 80px rgba(0, 0, 0, 0.72),
    0 0 48px var(--wtsc-accent-glow-soft);
  transform: scale(var(--wtsc-scale));
  transform-origin: top left;
  user-select: none;
}

.wtsc[data-theme="neon-loss"] {
  --wtsc-accent: #ff3b4a;
  --wtsc-accent-soft: rgba(255, 59, 74, 0.16);
  --wtsc-accent-mid: rgba(255, 59, 74, 0.45);
  --wtsc-accent-glow: rgba(255, 59, 74, 0.55);
  --wtsc-accent-glow-soft: rgba(255, 59, 74, 0.28);
  --wtsc-accent-deep: rgba(70, 12, 18, 0.55);
  --wtsc-stroke: rgba(255, 190, 198, 0.2);
  --wtsc-glass-border: rgba(255, 59, 74, 0.24);
  --wtsc-card-border: rgba(255, 59, 74, 0.3);
  --wtsc-panel-border: rgba(255, 59, 74, 0.2);
}

.wtsc-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.wtsc-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.wtsc-overlay-left {
  background: linear-gradient(
    90deg,
    rgba(2, 4, 8, 0.92) 0%,
    rgba(2, 4, 8, 0.78) 28%,
    rgba(2, 4, 8, 0.42) 48%,
    rgba(2, 4, 8, 0.08) 68%,
    rgba(2, 4, 8, 0) 82%
  );
}

.wtsc-overlay-bottom {
  background: linear-gradient(
    180deg,
    rgba(2, 4, 8, 0) 48%,
    rgba(2, 4, 8, 0.35) 72%,
    rgba(2, 4, 8, 0.78) 100%
  );
}

.wtsc-overlay-glow {
  background:
    radial-gradient(ellipse 42% 50% at 78% 28%, color-mix(in srgb, var(--wtsc-accent) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 36% 40% at 18% 58%, color-mix(in srgb, var(--wtsc-accent) 5%, transparent), transparent 72%);
}

.wtsc-overlay-vignette {
  background: radial-gradient(ellipse 78% 72% at 50% 48%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

.wtsc-header,
.wtsc-instrument,
.wtsc-hero,
.wtsc-levels,
.wtsc-bottom,
.wtsc-footer {
  position: absolute;
  z-index: 2;
}

.wtsc-header {
  top: 36px;
  left: 44px;
  right: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  white-space: nowrap;
}

.wtsc-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.wtsc-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 0 24px var(--wtsc-accent-glow-soft);
}

.wtsc-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wtsc-brand-text strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #f7fafc;
}

.wtsc-brand-sub {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--wtsc-accent);
}

.wtsc-brand-trader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}

.wtsc-brand-x {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(247, 250, 252, 0.92);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.18);
}

.wtsc-brand-handle {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.03em;
  color: #f7fafc;
}

.wtsc-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.wtsc-header-clock {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(232, 238, 246, 0.72);
  font-variant-numeric: tabular-nums;
}

.wtsc-result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 34px;
  padding: 0 14px;
  border: 1.5px solid var(--wtsc-accent);
  border-radius: 8px;
  color: var(--wtsc-accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: var(--wtsc-accent-soft);
  box-shadow: 0 0 18px var(--wtsc-accent-glow-soft);
}

.wtsc-instrument {
  top: 132px;
  left: 48px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  max-width: min(620px, 42%);
}

.wtsc-instrument-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wtsc-icon {
  width: 34px;
  height: 34px;
  display: block;
}

.wtsc-instrument-copy {
  min-width: 0;
}

.wtsc-symbol {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.wtsc-instrument-name {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 500;
  color: var(--wtsc-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.wtsc-dir-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--wtsc-accent-mid);
  background: var(--wtsc-accent-soft);
  color: var(--wtsc-accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.wtsc-dir-arrow {
  font-size: 15px;
  line-height: 1;
}

.wtsc-hero {
  top: 300px;
  left: 48px;
  width: min(720px, 48%);
}

.wtsc-hero-result {
  font-size: 210px;
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.04em;
  color: var(--wtsc-accent);
  text-transform: uppercase;
  transform: skewX(-10deg) rotate(-3deg);
  transform-origin: left center;
  text-shadow:
    0 0 28px var(--wtsc-accent-glow),
    0 0 64px var(--wtsc-accent-glow-soft),
    4px 6px 0 rgba(0, 0, 0, 0.45),
    -2px 0 0 var(--wtsc-accent-deep);
  -webkit-text-stroke: 1px var(--wtsc-stroke);
  filter: contrast(1.05);
}

.wtsc[data-result="LOSS"] .wtsc-hero-result {
  font-size: 175px;
  letter-spacing: -0.05em;
}

.wtsc-hero-setup {
  margin-top: 10px;
  margin-left: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: color-mix(in srgb, var(--wtsc-accent) 88%, white);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.wtsc-levels {
  left: 48px;
  bottom: 214px;
  width: min(760px, 52%);
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  padding: 22px 26px;
  border-radius: 16px;
  background: var(--wtsc-glass);
  border: 1px solid var(--wtsc-glass-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.wtsc-level {
  min-width: 0;
  padding: 0 8px;
}

.wtsc-level-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--wtsc-accent);
}

.wtsc-level-ico {
  font-size: 14px;
  opacity: 0.9;
}

.wtsc-level-value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f7fafc;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wtsc-level-sep {
  width: 1px;
  margin: 4px 10px;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--wtsc-accent) 0%, transparent),
    color-mix(in srgb, var(--wtsc-accent) 35%, transparent),
    color-mix(in srgb, var(--wtsc-accent) 0%, transparent)
  );
}

.wtsc-bottom {
  left: 48px;
  right: 48px;
  bottom: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 16px;
}

.wtsc-panel {
  min-width: 0;
  padding: 18px 22px;
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.68);
  border: 1px solid var(--wtsc-panel-border);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  overflow: visible;
}

.wtsc-panel-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(214, 222, 234, 0.55);
}

.wtsc-panel-value {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding-right: 2px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: #f4f7fb;
  white-space: normal;
  overflow: visible;
  overflow-wrap: break-word;
  word-break: normal;
}

.wtsc-panel-setup .wtsc-panel-value {
  /* Keep short setup names fully visible — do not ellipsis-clip the last letter. */
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.wtsc-panel-direction .wtsc-panel-value {
  white-space: nowrap;
  overflow: visible;
}

.wtsc-panel-result {
  color: var(--wtsc-accent);
  text-shadow: 0 0 18px var(--wtsc-accent-glow-soft);
}

.wtsc-footer {
  left: 48px;
  right: 48px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wtsc-footer-date {
  font-size: 15px;
  font-weight: 500;
  color: rgba(198, 208, 222, 0.55);
}

.wtsc-footer-site {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  color: var(--wtsc-accent);
  text-decoration: none;
}

.wtsc-footer-site svg {
  opacity: 0.85;
}

.wtsc-unsupported {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  min-height: 280px;
  padding: 28px;
  border-radius: 10px;
  border: 1px solid rgba(133, 151, 176, 0.18);
  background: #070a0e;
  color: var(--ink-2, #a7afba);
}

.wtsc-unsupported strong {
  font: 750 16px/1.3 var(--font-sans, sans-serif);
  color: var(--ink, #f5f6f8);
}

.wtsc-unsupported p {
  margin: 0;
  max-width: 46ch;
  font: 500 13px/1.45 var(--font-sans, sans-serif);
  color: var(--ink-3, #6a7280);
}

.pnl-card-templates[data-win-only="true"] button[data-pnl-card-template]:not([data-pnl-card-template="neon"]) {
  display: none;
}

.pnl-card-templates[data-win-only="true"] button[data-pnl-card-template="neon"] {
  pointer-events: none;
}

#pnlCardCanvas.hidden,
.wtsc-stage.hidden {
  display: none !important;
}

.pnl-card-action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pnl-card-action:focus-visible,
.pnl-card-close:focus-visible {
  outline: 2px solid rgba(57, 255, 106, 0.65);
  outline-offset: 2px;
}
