/* =========================
   Global
========================= */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: sans-serif;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* =========================
   App Layout
========================= */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* =========================
   Chart Area
========================= */

.chart-item {
  flex: 1;
  width: 100%;
  min-height: 0; /* wichtig für Flexbox + Canvas */
}

/* =========================
   Menu / Navigation
========================= */

.menu-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;        /* erlaubt Umbrechen bei kleinen Fenstern */
  height: 64px;
  width: 100%;
  padding: 0 16px;
  background-color: lightgrey;
}

/* =========================
   Menu Zones (Left / Center / Right)
========================= */

.menu-left,
.menu-right {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-right {
  justify-content: flex-end;
}

.menu-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 1;       /* Slider kann kleiner werden */
  gap: 16px;             /* Abstand zwischen Slider und StepSize */
  min-width: 0;          /* Flexbox-Trick */
}

/* =========================
   Menu Groups
========================= */

.menu-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =========================
   Time Range Slider
========================= */

.time-slider {
  width: 360px;        /* Standardbreite */
  max-width: 40vw;     /* skaliert bei kleinerem Fenster */
  flex-shrink: 1;
}

/* =========================
   StepSize / Inputs
========================= */

.step-size-wrapper,
.menu-container .MuiTextField-root,
.menu-container .MuiSelect-root {
  min-width: 140px;
}

/* =========================
   MUI Buttons
========================= */

.menu-container .MuiButton-root {
  white-space: nowrap;
  flex-shrink: 0;       /* Buttons schrumpfen nicht */
}

/* =========================
   Desktop Responsive Rules
========================= */

@media (max-width: 1200px) {

  .time-slider {
    width: 280px;
    max-width: 35vw;
  }

  .menu-left .MuiButton-root,
  .menu-right .MuiButton-root {
    padding: 4px 8px;
    font-size: 13px;
  }

  .menu-center {
    gap: 12px;
  }
}

@media (max-width: 900px) {

  .time-slider {
    width: 220px;
    max-width: 40vw;
  }

  .menu-left .MuiButton-root,
  .menu-right .MuiButton-root {
    padding: 3px 6px;
    font-size: 12px;
  }

  .menu-center {
    gap: 8px;
  }
}
:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
