/* Studio dialog: see dialog.js. By default the card floats over the top of
   the view (the root's positioned parent), centred, below the corner tools,
   like the hint card. A game places it elsewhere by styling .studio-dialog
   (Staff!: a dimmed layer over the whole page, the card in its middle), and
   gives it its own look with these tokens (defaults from base.css):

     --studio-dialog-bg, --studio-dialog-border, --studio-dialog-radius,
     --studio-dialog-shadow, --studio-dialog-width, --studio-dialog-font,
     --studio-dialog-title-font, --studio-dialog-accent (the code's colour) */

.studio-dialog {
  position: absolute;
  left: 50%;
  top: calc(var(--height-input) + 2 * var(--content-gap));
  transform: translateX(-50%);
  width: min(var(--studio-dialog-width, 360px), calc(100% - 2 * var(--content-gap)));
  z-index: 45; /* over the tray and the toast; under the Menu */
}
@media (max-width: 720px) {
  .studio-dialog { top: calc(2 * var(--height-input) + 2 * var(--content-gap)); } /* below the big Play button */
}

.studio-dialog-box {
  display: flex;
  flex-direction: column;
  gap: var(--content-gap);
  padding: var(--content-gap);
  background: var(--studio-dialog-bg, var(--color-surface));
  color: var(--color-text);
  border: var(--studio-dialog-border, var(--border-width) var(--border-style) var(--color-accent));
  border-radius: var(--studio-dialog-radius, var(--radius-lg));
  box-shadow: var(--studio-dialog-shadow, var(--shadow-drop));
  font: var(--studio-dialog-font, inherit);
  overflow-wrap: anywhere;
}
.studio-dialog-box > * { margin: 0; }
.studio-dialog-title { font: var(--studio-dialog-title-font, inherit); font-weight: var(--font-weight-bold); font-size: inherit; }
.studio-dialog-text { color: var(--color-text-dark); }
.studio-dialog-big { font-size: var(--font-size-lg); font-weight: var(--font-weight-bold); text-align: center; }
/* A web address to copy by hand: one tap picks all of it */
.studio-dialog-link {
  color: var(--color-text-dark);
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
/* A share code, big enough to read out ("BX7 K2M"), and the box to type one in */
.studio-dialog-code {
  font-size: var(--font-size-lg);
  line-height: var(--height-input);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--studio-dialog-accent, var(--color-accent));
}
.studio-dialog-input {
  height: var(--height-input);
  padding: 0 var(--space-2);
  border: var(--border-width) var(--border-style) var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-background);
  color: var(--color-text);
  font: inherit;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}
.studio-dialog-input:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-outline-offset); }
.studio-dialog-msg { min-height: 1lh; color: var(--studio-dialog-accent, var(--color-accent)); font-weight: var(--font-weight-bold); }
.studio-dialog-msg:empty { min-height: 0; }
.studio-dialog-buttons { display: flex; flex-wrap: wrap; gap: var(--content-gap); justify-content: flex-end; }
