/* Text-art backgrounds (js/ascii-scenes.js) and the ASCII skin for the Discord panel (js/ascii-panel.js). */
#ascii-bg {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, #0b1d2e 0%, #061019 70%, #04090f 100%);
  transition: background 1.6s ease;
}
#app.xmas-on #ascii-bg {
  background: linear-gradient(to bottom, #070b1c 0%, #0d1530 55%, #16224a 100%);
}

/* the pixel scenery is gone on this branch */
#snow-ground { display: none !important; }

/* ════════ Discord panel, ASCII skin (js/ascii-panel.js does the images + bars) ════════ */
#bottom-panel {
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Malgun Gothic", ui-monospace, monospace;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
/* every bit of text goes monospace; icon fonts keep their own face */
#bottom-panel, #bottom-panel *:not(i):not(.fa):not(.fas):not(.fab):not(.far) {
  font-family: var(--mono) !important;
}
/* the frame + "discord" label are drawn into the background grid by ascii-scenes.js */
#bottom-panel::after { content: none; }
#bottom-panel .activity-block,
#bottom-panel .spotify-container,
#bottom-panel .activity-image-container,
#bottom-panel .album-art,
#banner-strip, #banner-strip img {
  border-radius: 0 !important;
  box-shadow: none !important;
}
#bottom-panel .activity-block { border: 1px dashed rgba(255, 255, 255, 0.14); background: transparent; }
#bottom-panel .display-name { font-weight: 700; letter-spacing: 0.02em; }
#bottom-panel .display-name::before { content: "> "; opacity: 0.5; }

/* converted images: original hidden, ASCII drawn in its place */
.ascii-hidden { visibility: hidden !important; }
.avatar-container .ascii-hidden { position: absolute; inset: 0; }
.ascii-img {
  margin: 0;
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  font-family: var(--mono, monospace);
  letter-spacing: 0;
}
.avatar-container .ascii-img {
  position: absolute;
  left: 6px; top: 6px;
  width: 72px; height: 72px;
}
#banner-strip { position: relative; overflow: hidden; }
#banner-strip .ascii-img { position: absolute; inset: 0; }
.album-art-container, .activity-image-container { position: relative; }
.album-art-container .ascii-img,
.activity-image-container .ascii-img { position: absolute; inset: 0; }
/* the avatar's ASCII sits over the <img>, so clicks still reach it for the enlarge modal */
.avatar.ascii-hidden { visibility: visible !important; opacity: 0; }

/* status dot -> text tag in the avatar corner */
#bottom-panel .status-badge {
  width: auto; height: auto;
  border: 0; border-radius: 0;
  background: transparent !important;
  padding: 0 2px;
  font: 700 11px/1.2 var(--mono);
  color: #747f8d;
}
#bottom-panel .status-badge::after          { content: "[x]"; }
#bottom-panel .status-badge.online          { color: #3ba55c; }
#bottom-panel .status-badge.online::after   { content: "[+]"; }
#bottom-panel .status-badge.idle            { color: #faa61a; }
#bottom-panel .status-badge.idle::after     { content: "[~]"; }
#bottom-panel .status-badge.dnd             { color: #ed4245; }
#bottom-panel .status-badge.dnd::after      { content: "[-]"; }

/* progress bars -> text */
#bottom-panel .progress-bar.ascii-hidden { display: none; }
.ascii-bar {
  font: 11px/1.2 var(--mono);
  color: #8fbcbb;
  white-space: pre;
  overflow: hidden;
}
.spotify-activity .ascii-bar { color: #1db954; }

/* banner hidden for now (and the avatar no longer straddles it) */
#banner-strip { display: none !important; }
#bottom-panel.has-banner .avatar-container { margin-top: 0 !important; }

/* ── compact layout: the box hugs its content so the glyph frame fits snugly ──
   avatar on the left, name + status beside it (like a terminal prompt) */
#bottom-panel,
#app.xmas-on #bottom-panel {
  width: fit-content;
  min-width: 0;
  max-width: min(360px, calc(100vw - 40px));
}
#bp-who { padding: 8px 12px; }
#bottom-panel .presence-header { flex-direction: row; align-items: center; gap: 12px; }
#bottom-panel .user-info { width: auto; margin-top: 0; }
#bottom-panel .avatar-container,
#bottom-panel .avatar { width: 72px; height: 72px; }
#bottom-panel .avatar { border: 0; }
#bottom-panel .avatar-deco { width: 92px; height: 92px; }
#bottom-panel .avatar-container .ascii-img { left: 0; top: 0; }
#bottom-panel .status-badge { bottom: -2px; right: -6px; }
#bottom-panel .display-name { font-size: 1.05rem; }
#bottom-panel .social-links { display: none; }      /* empty while Steam is hidden */
#bp-activities { padding: 4px 12px 10px; }
#bp-activities::before { display: none; }
@media (max-width: 768px) {
  #bottom-panel .avatar-container,
  #bottom-panel .avatar { width: 56px; height: 56px; }
  #bottom-panel .avatar-deco { width: 72px; height: 72px; }
  #bottom-panel .display-name { font-size: 0.95rem; }
}

/* avatar decoration (the donut) hidden */
#bottom-panel .avatar-deco { display: none !important; }

/* "Copied!" toast, matching the text-art look: a terminal-style line in a box */
#dc-copy-toast {
  font-family: "Cascadia Mono", Consolas, ui-monospace, monospace;
  background: #070b18;
  border: 1px solid rgba(201, 214, 255, 0.45);
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 6px 12px;
  gap: 8px;
  min-width: 0;
}
#dc-copy-toast .dc-toast-icon { display: none; }
#dc-copy-toast .dc-toast-body { display: flex; align-items: baseline; gap: 8px; }
#dc-copy-toast .dc-toast-title { font-size: 12px; font-weight: 700; color: #c9d6ff; }
#dc-copy-toast .dc-toast-sub { font-size: 12px; margin: 0; color: #c9d6ff; }

/* snow only for now: no toggle, so no toggle hint */
.wordmark-hint { display: none !important; }
#xmas-toggle { cursor: default; }

/* keep the panel (and its glyph frame, which extends ~3 cells past it) clear of the corner */
#bottom-panel,
#app.xmas-on #bottom-panel { left: 56px; bottom: 44px; }
@media (max-width: 768px) {
  #bottom-panel,
  #app.xmas-on #bottom-panel { left: 36px; bottom: 32px; }
}

/* panel text a step smaller and tighter, to suit JetBrains Mono */
#bottom-panel .username        { font-size: 0.78rem; }
#bottom-panel .status-text     { font-size: 0.68rem; }
#bottom-panel .activity-title  { font-size: 0.62rem; letter-spacing: 0.06em; }
#bottom-panel .activity-detail,
#bottom-panel .spotify-details .activity-detail { font-size: 0.76rem; }
#bottom-panel .activity-state,
#bottom-panel .spotify-details .activity-state  { font-size: 0.7rem; }
#bottom-panel .progress-time   { font-size: 0.62rem; }
#bottom-panel .ascii-bar       { font-size: 10px; }
