/* Vista da telefono dentro la lobby (iframe con ?embed=1), uguale nei nove motori.
   Verticale: i rulli prendono tutto lo spazio che resta sopra i comandi.
   Orizzontale: i comandi passano in una colonna a destra e i rulli usano tutta l'altezza dell'iframe. */

@media (max-width: 767px) {
  html.embed body.has-pt-side .stage { padding: 52px 8px 6px; }
  html.embed .stage { padding-left: 8px; padding-right: 8px; }
  html.embed .meters { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); }
  html.embed .meters:has(> .meter:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html.embed .frame { padding: 6px; }
  html.embed .meter { padding: 3px 8px; }
  html.embed .meter span { font-size: .62rem; }
  html.embed .winline { font-size: .9rem; }
  html.embed .step { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
  html.embed body[data-suite-game="dynamic"] #btnSpin { width: 60px; height: 60px; min-height: 60px; margin-top: 2px; }
  html.embed body[data-suite-game="dynamic"] .step { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }
}

@media (max-height: 360px), (max-height: 500px) and (pointer: coarse) {
  html.embed body.has-pt-side .stage,
  html.embed .stage {
    padding: 4px 8px;
  }
  html.embed .stage:has(> .slot-stage-wrapper),
  html.embed .cabinet:has(> .slot-stage-wrapper) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, 208px);
    grid-template-rows: 44px repeat(5, auto) minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 4px;
    align-content: start;
    align-items: start;
    overflow: hidden;
  }
  html.embed .stage:has(> .slot-stage-wrapper)::before,
  html.embed .cabinet:has(> .slot-stage-wrapper)::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    height: 44px;
  }
  html.embed .stage > .slot-stage-wrapper,
  html.embed .cabinet > .slot-stage-wrapper {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    contain: size;
  }
  html.embed .stage:has(> .slot-stage-wrapper) > :not(.slot-stage-wrapper),
  html.embed .cabinet > :not(.slot-stage-wrapper) {
    grid-column: 2;
    min-width: 0;
  }
  html.embed .winline { margin-top: 0; margin-bottom: 0; min-height: 0; font-size: .8rem; line-height: 1.2; }
  html.embed .meters { display: grid; grid-template-columns: 1fr; gap: 3px; margin: 0; }
  html.embed .meter { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 8px; min-height: 0; }
  html.embed .meter span { font-size: .6rem; }
  html.embed .meter b { font-size: .85rem; }
  html.embed .meter .bet-row { display: flex; align-items: center; gap: 4px; }
  html.embed .meter input { min-height: 24px; width: 100%; max-width: 70px; padding: 0 4px; }
  html.embed .step { width: 32px; height: 32px; min-width: 32px; min-height: 32px; margin: 0; }
  html.embed button { margin-top: 0; min-height: 34px; padding-top: 4px; padding-bottom: 4px; }
  html.embed #btnSpin, html.embed .spinrow { margin: 0; width: 100%; }
  html.embed .spinrow { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 4px; }
  html.embed .spin-row { display: flex; justify-content: center; margin: 0; }
  html.embed .auto-btn { min-height: 28px; margin: 0; padding: 2px 10px; }
  html.embed .holdwin-settings { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: .66rem; }
  html.embed .holdwin-settings label { gap: 4px; }
  html.embed .holdwin-settings input { min-height: 0; width: 14px; height: 14px; }
  html.embed body[data-suite-game="dynamic"] #btnSpin { width: 52px; height: 52px; min-height: 52px; margin: 0; padding: 0; }
  html.embed body[data-suite-game="dynamic"] .step { width: 30px; height: 30px; min-height: 30px; margin: 0; }
}
