body {
  text-align: center;
  margin: 0;
  background: var(--color-bg);
}

.container {
  display: flex;
  justify-content: center;
  /* Horizontally center the items within the container */
  align-items: center;
  /* Vertically center the items within the container */
}

#pancreas {
  margin: 20px;
  font-size: 0.8em;
}

svg {
  width: 50%;
  height: 100px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  /* Add outline */
  min-height: 50px;
  /* Set minimum height */
}

line {
  stroke-width: 2;
}

.currentTime {
  stroke: green;
}

.mealTime {
  stroke: brown;
}

.glucoseLevel {
  stroke: red;
}

.critical {
  stroke: red;
  stroke-dasharray: 5;
}

.ideal {
  stroke: green;
  stroke-dasharray: 5;
}

.indicator {
  width: 50px;
  height: 50px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin: 0px;
}

.filled {
  background-color: green;
  background-image: url(/bloodglucose/mac.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.empty {
  background-color: transparent;
  background-image: none;
}

.indicator-container {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Horizontally center the items within the container */
}

.glucoselevel-container {
  display: flex;
  flex-direction: column;
  /* Stack items vertically */
  align-items: stretch;
  /* Stretch items to fill the container vertically */
  height: 20vh;
  /* Set height to 20% of the viewport height */
}

.chart-container {
  width: 80%;
  margin: 0 auto;
  min-height: 300px;
  max-height: 600px;
}

canvas {
  width: 100% !important;
  height: auto !important;
}

#glucoseChart {
  width: 100% !important;
  height: 100% !important;
}

main {
  padding: 1em;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  justify-content: center;
  margin-bottom: 1em;
}

.slider-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5em 1em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background-color: var(--color-surface);
  min-width: 200px;
}

.slider-groupnon {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: left;
  border-radius: 8px;
  min-width: 200px;
}

.indicator-container {
  margin: 1em 0;
  flex-wrap: wrap;
  gap: 0.75em;
  padding: 1em;
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

input[type="range"] {
  accent-color: var(--color-accent);
  width: 100%;
}

button {
  margin: 0.4em;
}

@media screen and (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: center;
  }

  .slider-group {
    width: 90%;
  }

  .indicator-container {
    flex-direction: column;
    align-items: center;
  }
}

.main-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1.5em;
  gap: 1.5em;
}

.sidebar {
  flex: 1;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5em;
}

.content {
  flex: 2;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5em;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.slider-group {
  display: flex;
  flex-direction: column;
  align-items: start;
  background: var(--color-surface-hover);
  padding: 1em 1.25em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.chart-container {
  width: 100%;
}

.glucose-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.1em;
  margin-top: 1em;
}

.glucose-time-box {
  flex: 1;
  text-align: center;
}

#glucoseLevelLine {
  width: 5vw;
  height: 100px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.glucose-time-row {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.1em;
  flex-wrap: wrap;
  margin: 1em auto;
}

.visual-box {
  width: auto;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1em 1.25em;
}

.glucose-modal-content {
  background-color: var(--color-surface);
  margin: 10% auto;
  padding: 2em;
  border: 1px solid var(--color-border);
  width: 80%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
