/* stats.css (Nada): dashboard layout, header pills, notes.txt */

/* page layout (the sketch):
     Ctrl+Heart ............................ pills
     notes.txt                      | LIVE DRAMA
     keyboard                       | #keyboard-gc
     legend                         | RESET PAUSE START            */
#dashboard {
  max-width: 1260px;
  margin: 0 auto;
  padding: 22px 24px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas:
    "header   header"
    "notes    drama"
    "keyboard gc"
    "keyboard blocked"
    "legend   controls";
  column-gap: 26px;
  row-gap: 16px;
  align-items: start;
}
#dashboard header        { grid-area: header; }
#dashboard #notepad-card { grid-area: notes; }
#dashboard #keyboard     { grid-area: keyboard; margin: 0; }
#dashboard .legend       { grid-area: legend; margin: 0; }
#dashboard .cards        { display: contents; }   /* its 3 cards join the grid */
#dashboard .card:has(#drama) { grid-area: drama; }
#dashboard .card:has(#gc)    { grid-area: gc; }
#dashboard #blocked-card     { grid-area: blocked; }
#dashboard #fav              { display: none; }    /* favourite child: removed */

/* Sara's START / PAUSE / RESET: a little row under the chat instead of floating */
#dashboard #controls {
  grid-area: controls;
  position: static;
  transform: rotate(-1.5deg);
  flex-direction: row-reverse;          /* RESET  PAUSE  START, like the sketch */
  justify-content: flex-start;
  gap: 10px;
}
#dashboard #controls .btn { flex: 1; white-space: nowrap; padding: 10px 8px; }

/* header: title left, 2 pills right */
#dashboard header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
#dashboard header h1 {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 34px;
  line-height: 1;
  margin: 0 auto 0 0;            /* pushes the pills to the right */
}
#dashboard header .plus { color: var(--hot); }

#count, #morale {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 14px;
  padding: 7px 16px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  white-space: nowrap;
  transition: background .3s;
}

/* morale pill colour follows the mood (stats.js sets data-mood) */
#morale[data-mood="thriving"] { background: var(--hot); color: #fff; }
#morale[data-mood="stable"]   { background: var(--mint); }
#morale[data-mood="tense"]    { background: var(--red); }
#morale[data-mood="doomed"]   { background: var(--ink); color: var(--yel); }

/* the cards in the right column */
.cards .card {
  padding: 14px 16px 16px;
  min-height: 150px;
}
.cards .card h3 {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 15px;
  margin: 0 0 10px;
}

/* "keys that have blocked u": striped little keycaps, in blocking order */
#dashboard #blocked-card { min-height: 0; transform: rotate(-1deg); }
#blocked-count { font-family: 'Poppins', sans-serif; font-size: 13px; color: var(--hot); }
#blocked-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  padding: 2px 2px 4px;          /* room for the chips' shadow, no fake scrollbar */
}
.blocked-none { font-family: 'Gaegu', cursive; font-size: 18px; opacity: .6; }
.blocked-chip {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 12px;
  padding: 3px 8px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--ink);
  background: repeating-linear-gradient(45deg, #ccc, #ccc 5px, #aaa 5px, #aaa 10px);
  text-decoration: line-through;
  animation: chip-in .25s ease-out;
}
@keyframes chip-in {
  from { transform: scale(.4) rotate(-12deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* notes.txt: lined paper notepad (top left) */
#notepad-card {
  padding: 14px 16px 10px;
  transform: rotate(-0.6deg);
}
#notepad-card h3 {
  font-family: 'Dela Gothic One', sans-serif;
  font-size: 15px;
  margin: 0 0 8px;
}
#notepad-card h3 small {
  font-family: 'Gaegu', cursive;
  font-size: 17px;
  font-weight: 400;
  margin-left: 8px;
  opacity: .75;
}
#notepad {
  display: block;
  width: 100%;
  height: 140px;
  resize: vertical;
  padding: 4px 10px;
  font-family: 'Gaegu', cursive;
  font-size: 22px;
  line-height: 28px;
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  outline: none;
  background: #fff repeating-linear-gradient(transparent 0 27px, var(--blush) 27px 28px);
  background-attachment: local;
}
#notepad:focus { box-shadow: 3px 3px 0 var(--hot); }
#notepad-status {
  margin: 6px 0 0;
  min-height: 1.2em;
  font-family: 'Gaegu', cursive;
  font-size: 19px;
  color: var(--hot);
}
#notepad-status.nope { animation: nope-shake .35s; }
@keyframes nope-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* narrow window: everything in one column */
@media (max-width: 1000px) {
  #dashboard {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "header" "notes" "keyboard" "legend" "controls" "drama" "gc" "blocked";
  }
}
