/* Arcade dashboard: keep the shared page chrome, replace the centre pad with mini extension cabinets */

#popup-wrapper.arcade-board {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  width: 75vw;
  max-width: 1000px;
  min-height: 624px;
  height: 624px;
  margin: 15px;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

.arcade-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
}

.arcade-cabinet {
  min-width: 0;
  min-height: 0;
}

.arcade-cabinet.is-live {
  cursor: pointer;
}

.arcade-cabinet.is-placeholder {
  cursor: default;
}

.arcade-cabinet-inner {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px 10px 8px;
  background: linear-gradient(145deg, #c03a3a, #b02a2a);
  border: 6px solid #222;
  border-radius: 18px;
  font-family: 'Courier New', monospace;
  color: #fff;
  box-shadow:
    8px 8px 0 #222,
    -4px -4px 0 #c03a3a,
    inset 4px 4px 0 #c03a3a,
    inset -4px -4px 0 #a02525,
    0 0 16px rgba(0, 0, 0, 0.5);
  border-top: 2px solid #c03a3a;
  border-left: 2px solid #c03a3a;
  border-bottom: 2px solid #a02525;
  border-right: 2px solid #a02525;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.arcade-cabinet.is-live:hover .arcade-cabinet-inner {
  box-shadow:
    8px 8px 0 #222,
    -4px -4px 0 #c03a3a,
    inset 4px 4px 0 #c03a3a,
    inset -4px -4px 0 #a02525,
    0 0 18px rgba(176, 255, 87, 0.25);
}

.arcade-cabinet-logo {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  z-index: 2;
  pointer-events: none;
}

.arcade-cabinet-battery {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  z-index: 2;
  pointer-events: none;
}

.arcade-battery-body {
  display: block;
  width: 22px;
  height: 10px;
  background: #ffd700;
  border: 2px solid #222;
  border-radius: 2px;
  box-shadow: inset 3px 0 0 #b8860b, 0 0 4px #ffd700;
}

.arcade-battery-nub {
  display: block;
  width: 3px;
  height: 5px;
  background: #ffd700;
  border: 2px solid #222;
  border-left: none;
  border-radius: 0 1px 1px 0;
  margin-left: -1px;
}

.arcade-cabinet-inner h2 {
  text-align: center;
  font-size: 15px;
  margin: 4px 0 0;
  text-transform: uppercase;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.35);
  letter-spacing: 1px;
}

.arcade-cabinet-inner p {
  text-align: center;
  font-size: 8px;
  margin: 2px 0 6px;
  color: #fff;
  line-height: 1.2;
}

.arcade-launch-btn {
  display: block;
  width: 100%;
  background: #a0a0a0;
  color: #333;
  border: 3px solid #666;
  padding: 7px 8px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  white-space: nowrap;
  box-shadow:
    3px 3px 0 #666,
    inset 2px 2px 0 #ccc,
    inset -2px -2px 0 #555;
  transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
  position: relative;
  flex-shrink: 0;
}

.arcade-cabinet.is-live .arcade-launch-btn {
  cursor: pointer;
}

.arcade-cabinet.is-live:hover .arcade-launch-btn,
.arcade-cabinet.is-live .arcade-launch-btn:hover {
  background: #b0b0b0;
  transform: translate(1px, 1px);
  box-shadow:
    2px 2px 0 #666,
    inset 2px 2px 0 #ccc,
    inset -2px -2px 0 #555;
}

.arcade-cabinet.is-live .arcade-launch-btn:active {
  background: #808080;
  color: #fff;
  transform: translate(2px, 2px);
  box-shadow:
    1px 1px 0 #666,
    inset 2px 2px 0 #ccc,
    inset -2px -2px 0 #555;
}

.arcade-launch-btn:disabled {
  background: #a0a0a0;
  color: #333;
  cursor: default;
  opacity: 1;
}

.arcade-preview {
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  background: #1a2a1a;
  color: #9acd32;
  border: 3px solid #333;
  border-radius: 8px;
  background-image: linear-gradient(rgba(154, 205, 50, 0.05) 1px, transparent 1px);
  background-size: 100% 2px;
  overflow: hidden;
}

.arcade-preview-maze {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.arcade-preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

/* Three footer buttons evenly under the 3x2 arcade grid */
#button-1 {
  left: calc(50% - 37.5vw);
}

#button-2 {
  left: calc(50% - 96px);
}

#button-3 {
  left: calc(50% + 37.5vw - 192px);
}

@media screen and (min-width: 1334px) {
  #button-1 {
    left: calc(50% - 500px);
  }

  #button-2 {
    left: calc(50% - 96px);
  }

  #button-3 {
    left: calc(50% + 308px);
  }
}

@media screen and (min-width: 1367px) and (max-width: 1600px) {
  #button-1 {
    left: calc(50% - 37.5vw + 95px) !important;
  }

  #button-2 {
    left: calc(50% - 96px) !important;
  }

  #button-3 {
    left: calc(50% + 37.5vw - 288px) !important;
  }
}
