/* MABNI 1.2.22: event game controls hard fix
   Fixes invisible arrow buttons caused by older Kenney CSS forcing font-size:0 and pseudo icons. */
.workspace-meta{gap:.45rem;align-items:stretch}.workspace-note{max-width:100%;white-space:normal!important;overflow:visible!important;line-height:1.25}.workspace-note.helper-path-note{border:1px solid rgba(124,58,237,.22);background:linear-gradient(135deg,rgba(124,58,237,.10),rgba(0,78,146,.06));color:#2d1b69}body.theme-dark .workspace-note.helper-path-note,html.theme-dark .workspace-note.helper-path-note,body.night .workspace-note.helper-path-note,html[data-theme="night"] .workspace-note.helper-path-note{background:linear-gradient(135deg,rgba(167,139,250,.18),rgba(96,165,250,.10));color:#f5f3ff;border-color:rgba(196,181,253,.34)}

/* Main event pad: compact game-controller layout, never the giant empty white tray. */
#eventGamePad.event-game-pad:not(.hidden){
  display:grid!important;
  grid-template-columns:72px 72px 72px!important;
  grid-template-rows:auto auto 58px 58px!important;
  grid-template-areas:
    "score score score"
    "new new new"
    ". up ."
    "left down right"!important;
  align-items:center!important;
  justify-content:center!important;
  justify-items:center!important;
  gap:8px!important;
  width:max-content!important;
  max-width:calc(100% - 20px)!important;
  min-width:0!important;
  height:auto!important;
  min-height:0!important;
  margin:10px auto 12px!important;
  padding:12px 14px!important;
  border-radius:22px!important;
  border:1px solid rgba(0,78,146,.18)!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 14px 30px rgba(15,23,42,.10)!important;
  position:relative!important;
  z-index:10!important;
  overflow:visible!important;
}
body.theme-dark #eventGamePad.event-game-pad:not(.hidden),html.theme-dark #eventGamePad.event-game-pad:not(.hidden),body.night #eventGamePad.event-game-pad:not(.hidden),html[data-theme="night"] #eventGamePad.event-game-pad:not(.hidden){
  background:rgba(15,23,42,.96)!important;
  border-color:rgba(125,211,252,.30)!important;
  box-shadow:0 16px 32px rgba(0,0,0,.36)!important;
}

#eventGamePad .event-game-score{grid-area:score!important;display:inline-flex!important;align-items:center;justify-content:center;max-width:100%;white-space:nowrap;font-size:.82rem!important;font-weight:900!important;color:#0f3558!important;background:#eef8ff!important;border:1px solid rgba(0,78,146,.18)!important;border-radius:999px!important;padding:7px 12px!important;line-height:1!important;box-shadow:none!important;}
body.theme-dark #eventGamePad .event-game-score,html.theme-dark #eventGamePad .event-game-score,body.night #eventGamePad .event-game-score,html[data-theme="night"] #eventGamePad .event-game-score{color:#e5f2ff!important;background:rgba(30,41,59,.95)!important;border-color:rgba(148,163,184,.32)!important;}

#eventGamePad .event-new{grid-area:new!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;width:100%!important;min-width:0!important;min-height:42px!important;height:42px!important;padding:0 14px!important;border-radius:16px!important;white-space:nowrap!important;font-size:.9rem!important;font-weight:900!important;background:linear-gradient(180deg,#ffffff,#e7f4ff)!important;color:#073b65!important;border:1px solid rgba(0,78,146,.22)!important;box-shadow:0 5px 0 rgba(0,78,146,.12),0 12px 22px rgba(15,23,42,.10)!important;background-image:linear-gradient(180deg,#ffffff,#e7f4ff)!important;}
body.theme-dark #eventGamePad .event-new,html.theme-dark #eventGamePad .event-new,body.night #eventGamePad .event-new,html[data-theme="night"] #eventGamePad .event-new{background:linear-gradient(180deg,#263247,#172033)!important;color:#e0f2fe!important;border-color:rgba(125,211,252,.30)!important;box-shadow:0 5px 0 rgba(0,0,0,.38),0 12px 22px rgba(0,0,0,.24)!important;}

/* Kill the old broken Kenney pseudo-icon system that made buttons blank. */
#eventGamePad .event-arrow::before,#eventGamePad .event-arrow::after{display:none!important;content:none!important;background:none!important;}
#eventGamePad .event-arrow{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:64px!important;
  height:54px!important;
  min-width:64px!important;
  min-height:54px!important;
  max-width:64px!important;
  max-height:54px!important;
  padding:0!important;
  margin:0!important;
  border-radius:18px!important;
  border:2px solid rgba(0,78,146,.24)!important;
  background:#ffffff!important;
  background-image:linear-gradient(180deg,#ffffff,#dff1ff)!important;
  color:#004E92!important;
  font-size:2rem!important;
  font-weight:1000!important;
  line-height:1!important;
  font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif!important;
  text-indent:0!important;
  opacity:1!important;
  visibility:visible!important;
  box-shadow:0 5px 0 rgba(0,78,146,.18),0 13px 24px rgba(15,23,42,.12)!important;
  transform:none!important;
  filter:none!important;
}
#eventGamePad .event-arrow:hover{transform:translateY(-1px)!important;background-image:linear-gradient(180deg,#ffffff,#cfe9ff)!important;}
#eventGamePad .event-arrow:active{transform:translateY(2px)!important;box-shadow:0 2px 0 rgba(0,78,146,.18),0 8px 16px rgba(15,23,42,.10)!important;}
#eventGamePad .event-arrow:focus-visible{outline:4px solid rgba(207,161,91,.45)!important;outline-offset:3px!important;}
body.theme-dark #eventGamePad .event-arrow,html.theme-dark #eventGamePad .event-arrow,body.night #eventGamePad .event-arrow,html[data-theme="night"] #eventGamePad .event-arrow{background:#1f2a3f!important;background-image:linear-gradient(180deg,#2d3a54,#172033)!important;color:#e0f2fe!important;border-color:rgba(125,211,252,.36)!important;box-shadow:0 5px 0 rgba(0,0,0,.42),0 13px 24px rgba(0,0,0,.28)!important;}
#eventGamePad .event-up{grid-area:up!important;}#eventGamePad .event-left{grid-area:left!important;}#eventGamePad .event-down{grid-area:down!important;}#eventGamePad .event-right{grid-area:right!important;}

/* Keep the event panel from covering the Run dock on short screens. */
.left-panel #eventGamePad.event-game-pad:not(.hidden)+.run-dock{margin-top:4px!important;}
@media (max-height:760px){#eventGamePad.event-game-pad:not(.hidden){grid-template-columns:60px 60px 60px!important;grid-template-rows:auto auto 48px 48px!important;gap:6px!important;padding:8px 10px!important;margin:6px auto 8px!important;border-radius:18px!important}#eventGamePad .event-arrow{width:54px!important;height:46px!important;min-width:54px!important;min-height:46px!important;max-width:54px!important;max-height:46px!important;font-size:1.65rem!important;border-radius:15px!important}#eventGamePad .event-new{height:36px!important;min-height:36px!important;font-size:.78rem!important;padding:0 10px!important}#eventGamePad .event-game-score{font-size:.74rem!important;padding:5px 10px!important}}
@media (max-width:560px){#eventGamePad.event-game-pad:not(.hidden){grid-template-columns:56px 56px 56px!important;grid-template-rows:auto auto 46px 46px!important;max-width:100%!important}#eventGamePad .event-arrow{width:50px!important;height:44px!important;min-width:50px!important;min-height:44px!important;font-size:1.55rem!important}}
