/* #syncpundit channel pane */
.irc {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 0;
}

.irc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  cursor: default;
}

.irc-chan {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-strong);
  white-space: nowrap;
}

.irc-topic {
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.irc-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  background: var(--raised);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.irc-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.irc-log p {
  margin: 0;
  padding: 1px 6px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

.irc-log p:hover { background: var(--bg-2); }

.irc-log .line-new { animation: lineIn var(--dur-line) ease-out; }
@keyframes lineIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

.irc-ts { color: var(--ts); font-size: 11px; margin-right: 6px; }
.irc-jp { color: var(--joinpart); }
.irc-sys { color: var(--faint); font-style: italic; }
.irc-action { color: var(--muted); font-style: italic; }
.irc-notice { color: var(--warn); }
.irc-nick { font-weight: 600; }
.irc-nick.op { color: var(--nick-op); }
.irc-nick.bot { color: var(--nick-bot); }
.irc-body { color: var(--text); }
.irc-body.dim { color: var(--muted); }

.irc-log p.hl {
  background: rgba(255, 209, 102, .07);
  border-left: 2px solid var(--nick-op);
  padding-left: 8px;
}

.irc-log p.legacy {
  color: #57c26b;
  font-family: var(--mono);
  background: rgba(87, 194, 107, .05);
}

.irc-input {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 8px 12px;
}

.irc-input .nick { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

.irc-input input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text-strong);
  font-family: var(--mono);
  font-size: 12.5px;
  caret-color: var(--benign);
}

.irc-input input::placeholder { color: var(--faint); }

/* mobile: docked bottom sheet */
@media (max-width: 959px) {
  .irc {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 40;
    max-height: 45vh;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .55);
  }

  .irc.collapsed .irc-log { display: none; }
  .irc.collapsed { max-height: none; }
  .irc-top { cursor: pointer; }
  .irc-caret { color: var(--faint); font-size: 11px; }
}

@media (min-width: 960px) {
  .irc-caret { display: none; }
}
