/* CPMS Sim-Pit fixed MFD layout */

/*
 * The sim-pit clamp belongs to a fixed cockpit display, where the page
 * must fill the panel exactly and scrolling would be wrong.
 *
 * It used to apply everywhere. On any screen smaller than the layout was
 * drawn for - a 13-inch laptop, a tablet - height:100vh with
 * overflow:hidden made everything past the fold unreachable rather than
 * merely below it, and no amount of responsive work further down the
 * cascade could undo an !important on html and body.
 *
 * It now applies only where there is genuinely room for the fixed
 * layout. Smaller viewports scroll like an ordinary page.
 */
html,
body,
#app-root {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

@media (min-width: 1561px) and (min-height: 860px) {
  html,
  body,
  #app-root {
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
  }
}

.mfd-viewport-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 0;
  padding: 16px;
  box-sizing: border-box;
}

.training-shell.mfd-viewport-container {
  width: 100%;
  min-height: 0;
  margin: 0;
}

.training-header .mfd-tab-bar {
  align-self: stretch;
  margin: 0;
  padding: 0;
}

.training-header .mfd-tab-bar .training-nav {
  display: flex;
  min-width: max-content;
}

.training-header .mfd-tab-bar .mfd-tab-button {
  display: inline-flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  border-top: 0;
  border-bottom: 0;
}

.mfd-tab-panel {
  flex: 1;
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  background-color: rgba(10, 14, 18, 0.9);
  border: 1px solid rgba(0, 255, 102, 0.4);
  border-radius: 4px;
  box-sizing: border-box;
}

.mfd-tab-bar {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  overflow-x: auto;
  border-bottom: 2px solid rgba(0, 255, 102, 0.4);
}

.mfd-tab-button {
  flex: 0 0 auto;
  padding: 12px 24px;
  color: #00ff66;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(0, 255, 102, 0.4);
  font-size: 18px !important;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mfd-tab-button.active,
.mfd-tab-button[aria-current="page"] {
  color: #000 !important;
  background: #00ff66 !important;
  border-color: #00ff66 !important;
}

.mfd-tab-button:hover:not(.active):not([aria-current="page"]) {
  background: rgba(0, 255, 102, 0.25);
}

@media (max-width: 720px) {
  .mfd-viewport-container {
    padding: 8px;
  }

  .mfd-tab-panel {
    padding: 16px;
  }
}
