/* NgideIn Social beside the game (<auth>/client/ngidein-social.js draws the
   board), in Perjuangan Semut's colours: a wooden board with a gold rim and
   cream cards, gold tabs like the game's "Masuk game" button. The panel only
   shows when sign-in is configured (body.has-social, set by social-panel.js). */

.layout {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: var(--gap);
}

.social {
  width: var(--board-w);
  flex: none;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* the game sets the row's height; a long chat scrolls inside the panel */
  contain: size;
  /* the parchment of the game's own dialogs; the SDK writes --ns-ink
     straight onto the frame, so the frame stays light */
  --ns-frame-top: #fff3d6;
  --ns-frame: #f3dfb4;
  --ns-frame-bottom: #e2c38a;
  --ns-frame-highlight: var(--gold);
  --ns-ink: var(--ink);
  --ns-card: #fffaf0;
  --ns-chip: #f6e3bd;
  --ns-strong: var(--gold);
  --ns-on-strong: var(--ink);
  --ns-font: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--cream);
  font-weight: 600;
}

.has-social { --board-w: 300px; --gap: 18px; }
.has-social.panel-hidden { --board-w: 0px; --gap: 0px; }

.social[hidden],
.panel-hidden .social { display: none; }

/* With the panel open the board is narrower: the less used buttons keep
   only their icon so the bar fits. */
.has-social:not(.panel-hidden) .actions .btn:not(.panel-toggle) .btn__text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.has-social:not(.panel-hidden) .actions .btn:not(.panel-toggle) { padding: 0 9px; }

.panel-toggle[aria-expanded="false"] { background: linear-gradient(180deg, #e6dccb 0%, #b9a88d 100%); }

.side-note {
  margin: 12px;
  color: #6b3a12;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* Below this width the panel moves under the game. */
@media (max-width: 1000px) {
  .has-social { --board-w: 0px; --gap: 0px; }
  .layout { flex-direction: column; align-items: center; gap: 16px; }
  .has-social .social {
    width: calc(var(--game-w) + 2 * var(--rim-side));
    max-width: 640px;
    height: 70vh;
    contain: none;
  }
}
