/**
 * @file
 * Lightning payment-channel simulator styling.
 */
.wl-edu-ch {
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--color-border-subtle, rgba(255, 255, 255, 0.14));
  border-radius: 12px;
  background: var(--color-surface-raised, rgba(255, 255, 255, 0.03));
  border-left: 3px solid #5b8dff;
}
.wl-edu-ch.is-closed { border-left-color: #94a3b8; opacity: 0.97; }

/* Balance bar */
.wl-edu-ch__bar {
  display: flex; height: 3.1rem; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--color-border-subtle, rgba(255, 255, 255, 0.14));
  background: rgba(0, 0, 0, 0.3);
}
.wl-edu-ch__side {
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 0.7rem; overflow: hidden; white-space: nowrap;
  transition: width 0.35s ease; min-width: 0;
}
.wl-edu-ch__side--a { background: linear-gradient(180deg, rgba(59, 130, 246, 0.42), rgba(59, 130, 246, 0.22)); align-items: flex-start; }
.wl-edu-ch__side--b { background: linear-gradient(180deg, rgba(148, 163, 184, 0.42), rgba(148, 163, 184, 0.22)); align-items: flex-end; text-align: right; }
.wl-edu-ch__name { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255, 255, 255, 0.75); }
.wl-edu-ch__bal { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9rem; font-weight: 700; color: #fff; }
.wl-edu-ch__cap { margin: 0.45rem 0 0.9rem; font-size: 0.76rem; color: var(--color-text-muted, rgba(255, 255, 255, 0.6)); }

/* Stats */
.wl-edu-ch__stats { display: flex; gap: 0.7rem; margin-bottom: 0.95rem; }
.wl-edu-ch__stat {
  flex: 1 1 0; min-width: 0; text-align: center;
  padding: 0.6rem 0.4rem; border-radius: 10px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--color-border-subtle, rgba(255, 255, 255, 0.1));
}
.wl-edu-ch__num { display: block; font-size: 1.55rem; font-weight: 800; line-height: 1.1; color: var(--color-accent-secondary, #5b8dff); }
.wl-edu-ch__stat--chain .wl-edu-ch__num { color: #f7931a; }
.wl-edu-ch__lbl { display: block; margin-top: 0.15rem; font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted, rgba(255, 255, 255, 0.55)); }

/* Controls */
.wl-edu-ch__controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.55rem; }
.wl-edu-ch__controls label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted, rgba(255, 255, 255, 0.55)); }
.wl-edu-ch__controls input {
  width: 8rem; padding: 0.45rem 0.55rem; border-radius: 7px;
  border: 1px solid var(--color-border-subtle, rgba(255, 255, 255, 0.18));
  background: rgba(0, 0, 0, 0.32); color: var(--color-text-primary, #fff);
  font-size: 0.9rem; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.wl-edu-ch__btn {
  padding: 0.5rem 0.8rem; border-radius: 7px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
  border: 1px solid var(--color-border-subtle, rgba(255, 255, 255, 0.2));
  background: rgba(26, 78, 255, 0.16); color: var(--color-accent-secondary, #5b8dff);
  transition: transform 0.08s ease, background 0.15s ease;
}
.wl-edu-ch__btn:hover:not(:disabled) { background: rgba(26, 78, 255, 0.28); transform: translateY(-1px); }
.wl-edu-ch__btn--close { background: rgba(247, 147, 26, 0.16); color: #f7931a; }
.wl-edu-ch__btn--close:hover:not(:disabled) { background: rgba(247, 147, 26, 0.28); }
.wl-edu-ch__btn--ghost { background: transparent; color: var(--color-text-muted, rgba(255, 255, 255, 0.6)); }
.wl-edu-ch__btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Note + log */
.wl-edu-ch__note { margin: 0.85rem 0 0; font-size: 0.85rem; min-height: 1.2rem; color: var(--color-text-muted, rgba(255, 255, 255, 0.7)); }
.wl-edu-ch__note--ok { color: #34d399; }
.wl-edu-ch__note--warn { color: #fbbf24; }
.wl-edu-ch__log { margin-top: 0.8rem; display: flex; flex-direction: column; gap: 0.3rem; max-height: 12rem; overflow-y: auto; }
.wl-edu-ch__logline {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.76rem; line-height: 1.35;
  padding: 0.35rem 0.55rem; border-radius: 6px; background: rgba(0, 0, 0, 0.26);
  border-left: 2px solid rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.82);
}
.wl-edu-ch__logline--open { border-left-color: #34d399; }
.wl-edu-ch__logline--pay { border-left-color: #5b8dff; }
.wl-edu-ch__logline--close { border-left-color: #f7931a; }

@media (max-width: 520px) {
  .wl-edu-ch__num { font-size: 1.25rem; }
  .wl-edu-ch__controls input { width: 100%; }
  .wl-edu-ch__controls label { flex: 1 1 100%; }
}
