/* Custom css for the fhg677-met-pv theme */
:root {
	--measure: 100ch;
}
body {
  font-size: 0.7rem;
}
/* ---------- Image viewer ---------- */

.viewer { display: flex; align-items: center; gap: 0.75rem; }
.viewer__figure { flex: 1; min-width: 0; margin: 0; }
.viewer__figure img { display: block; max-width: 100%; max-height: 80vh; height: auto; margin: 0 auto; }

.viewer__arrow {
  flex: none; display: grid; place-items: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-size: 2rem; line-height: 1; text-decoration: none;
}
a.viewer__arrow:hover { background: var(--accent); color: var(--surface); }
.viewer__arrow.is-disabled { opacity: 0.3; }

.viewer__bar { display: flex; justify-content: space-between; color: var(--muted); margin-top: 1rem;
}
.viewer__figure { touch-action: pan-y; }
.viewer__caption { text-align: center; color: var(--muted); margin: 0.75rem 0 0; }

/* -------------- Weather Stats Images ----------- */
.weather-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}
.weather-images figure { margin: 0; }
.weather-images img {
  display: block;
  width: auto;        /* natural width, never stretched */
  max-width: 100%;    /* shrinks only if the column is narrower */
  height: auto;       /* keeps the original proportions */
}
.weather-images figcaption { color: var(--muted); margin-top: 0.4rem; }

/* -------------- Weather Stats Table ----------- */
.table-scroll { overflow: auto; max-height: 70vh; margin: 1rem 0 2rem; }

.weather-table {
  border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.7rem;
  border-top: 1px solid var(--surface);
  border-left: 1px solid var(--surface);
  font-size: 0.7rem;
}
.weather-table th, .weather-table td {
  /* padding: 0.45rem 0.8rem; text-align: left; white-space: nowrap; */
  padding: 0.2rem 0.1rem; text-align: left; white-space: nowrap;
  border-right: 1px solid var(--surface);
  border-bottom: 1px solid var(--surface);
}
.weather-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface); color: var(--ink);
}
.weather-table tbody tr:nth-child(even) { background: var(--accent-soft); }

/* -------------- PV Stats Images ----------- */
.pv-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}
.pv-images figure { margin: 0; }
.pv-images img {
  display: block;
  width: auto;        /* natural width, never stretched */
  max-width: 100%;    /* shrinks only if the column is narrower */
  height: auto;       /* keeps the original proportions */
}
.pv-images figcaption { color: var(--muted); margin-top: 0.4rem; }

/* -------------- PV Stats Table ----------- */
/* (.table-scroll above is shared with the weather tables) */
.pv-table {
  border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.7rem;
  border-top: 1px solid var(--surface);
  border-left: 1px solid var(--surface);
}
.pv-table th, .pv-table td {
  padding: 0.2rem 0.1rem; text-align: left; white-space: nowrap;
  border-right: 1px solid var(--surface);
  border-bottom: 1px solid var(--surface);
}
.pv-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--surface); color: var(--ink);
}
.pv-table tbody tr:nth-child(even) { background: var(--accent-soft); }

/* -------------- Progress page: image | text | image, newest first ----------- */
.progress-list { margin: 1.5rem 0 2rem; }

.progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.progress-row img {
  display: block;
  width: auto;        /* natural width, never stretched */
  max-width: 100%;    /* shrinks only if the column is narrower */
  height: auto;       /* keeps the original proportions */
}

.progress-row__text p { margin: 0 0 0.9rem; }

/* Small screens: stack as left image, text, right image */
@media (max-width: 48rem) {
  .progress-row { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
}

/* -------------- Custom Colours --------------------- */
.prose {
  font-size: 0.8rem;
}


.tabs-wrapper.ui-theme-default.top-left {
	background: var(--bg);
}
/*
.tabs-nav {
	background: var(--surface);
}
*/
.tabs {
	background: var(--bg);
}


/* -------------- Methane air pollution images, two columns ----------- */
.methane-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}
.methane-images figure { margin: 0; }
.methane-images img {
  display: block;
  width: auto;        /* natural width, never stretched */
  max-width: 100%;    /* shrinks only if the column is narrower */
  height: auto;       /* keeps the original proportions */
}
.methane-images figcaption { color: var(--muted); margin-top: 0.4rem; }

/* Narrow screens: one column */
@media (max-width: 40rem) {
  .methane-images { grid-template-columns: minmax(0, 1fr); }
}
