@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Source+Serif+4:wght@500&display=swap");

html,
body {
  margin: 0;
  background: #141414;
  color: #f4f6f8;
  font-family: "Open Sans", sans-serif;
}

a:hover {
  opacity: 0.6;
}

.red-ish {
  color: #ba2456;
}

/* ---------- full-viewport shell: no page scroll on desktop ---------- */

.page {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr);
  overflow: hidden;
}

/* ---------- left: header + graph ---------- */

.app__left__section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 32px 12px;
}

.header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.header__title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dash-logo {
  display: block;
  height: 48px;
  width: auto;
  margin-left: -20px; /* the logo PNG has built-in padding */
}

.header h4 {
  margin: 0;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 26px;
  font-weight: 500;
}

.header__info {
  margin: 6px 0 0;
  font-size: 15px;
}

.header__button {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 9px 16px;
  color: #f9fafb;
  text-decoration: none;
  border: 1px solid #f9fafb;
  border-radius: 0.35rem;
  white-space: nowrap;
}

.graph__container {
  flex: 1 1 auto;
  min-height: 0;
}

.brain-graph {
  height: 100%;
  width: 100%;
  user-select: none;
}

/* ---------- right: controls + event data ---------- */

.app__right__section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 28px;
  background: #1d1d1d;
  border-left: 5px solid black;
  overflow-y: auto;
}

.block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-fill {
  flex: 1 1 0;
  min-height: 140px;
}

.subheader-row {
  line-height: 1.3;
}

.subheader {
  font-size: 1.2em;
  color: #dfe3e8;
}

.divider {
  color: #dfe3e8;
}

.small-text {
  color: #919eab;
}

.colorscale-button {
  padding: 5px;
  background: transparent;
  border: 1px solid #c4cdd5;
  border-radius: 0.5rem;
  cursor: pointer;
}

.colorscale-button:hover {
  border-color: white;
}

.swatch {
  display: flex;
  height: 26px;
}

.swatch span {
  width: 36px;
}

.swatch-sm {
  height: 14px;
}

.swatch-sm span {
  width: 14px;
}

.info__container {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  padding: 16px 24px;
  overflow: auto;
  background: #292929;
  color: white;
  font-size: 12px;
  line-height: 1.6;
}

.credits {
  flex: 0 0 auto;
  font-size: 13px;
  color: #919eab;
}

/* ---------- small screens: stack and allow scrolling ---------- */

@media (max-width: 1000px) {
  .page {
    height: auto;
    overflow: visible;
    grid-template-columns: minmax(0, 1fr);
  }

  .app__left__section {
    padding: 16px;
  }

  .graph__container {
    height: 60vh;
    flex: none;
  }

  .app__right__section {
    border-left: none;
    border-top: 5px solid black;
    overflow: visible;
  }

  .block-fill {
    height: 260px;
    flex: none;
  }
}

@media (max-width: 600px) {
  .header {
    flex-direction: column;
    gap: 8px;
  }

  .header__button {
    margin-top: 0;
  }

  .dash-logo {
    height: 36px;
  }

  .header h4 {
    font-size: 20px;
  }
}
