/*
  Cholestie website: the /go pages (download options, click statistics).
  Loaded after styles.css.
*/

.go-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  min-height: 100vh;
  padding: clamp(32px, 8vh, 80px) var(--gutter);
  background: var(--cream);
}

.go-page__brand {
  font-size: 1.375rem;
}

.go-card {
  width: 100%;
  max-width: 560px;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.go-card > * + * {
  margin-top: 14px;
}

.go-card__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.15;
  color: var(--green-ink);
}

.go-card__text {
  color: var(--muted);
}

.go-card__error {
  color: #B42318;
}

.go-card__stores {
  justify-content: center;
  padding-top: 10px;
}

.go-page__footer {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Click statistics */

.go-card--wide {
  max-width: 1180px;
  text-align: left;
}

.go-card--wide h2 {
  margin-top: 32px;
  font-size: 1.25rem;
}

.go-stats__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.go-stats__filters label {
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
}

.go-stats__table {
  overflow-x: auto;
}

.go-stats__table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.go-stats__table th,
.go-stats__table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.go-stats__notes {
  padding-left: 1.2em;
  font-size: 0.875rem;
  list-style: disc;
}

/* Admin pages: dashboard (stats.php) and campaign links (links.php) */

.go-admin__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.go-admin__nav form {
  margin-left: auto;
}

.go-admin__tab {
  padding: 6px 0;
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.go-admin__tab.is-current {
  color: var(--green-dark);
  box-shadow: inset 0 -2px 0 var(--green);
}

.go-dash .go-card__title {
  margin-top: 20px;
}

.go-small {
  font-size: 0.875rem;
}

.go-muted {
  color: var(--muted);
  font-size: 0.8125rem;
}

.go-stats__table .num {
  text-align: right;
}

.go-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.go-kpi {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
}

.go-kpi__label {
  font-size: 0.8125rem;
  color: var(--muted);
}

.go-kpi__value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--green-ink);
  font-variant-numeric: tabular-nums;
}

.go-kpi__state {
  font-weight: 600;
  color: var(--green-ink);
}

.go-kpi__note {
  font-size: 0.8125rem;
  color: var(--muted);
}

.go-kpis--elsewhere .go-kpi {
  background: var(--surface);
  border-style: dashed;
}

.go-section > h2,
details.go-section > summary {
  margin: 32px 0 12px;
  font-size: 1.125rem;
  font-weight: 600;
}

details.go-section > summary {
  cursor: pointer;
}

.go-bars {
  display: grid;
  gap: 14px;
  padding: 0;
  list-style: none;
}

.go-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
}

.go-bar__value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.go-bar__track {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: var(--mint);
}

.go-bar__fill {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: 999px;
  background: var(--green);
}

.go-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 24px;
}

.go-builder {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px 20px;
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--cream);
}

.go-builder label {
  display: grid;
  gap: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.go-builder label .go-muted {
  font-weight: 400;
}

.go-builder > p,
.go-builder > .go-card__error {
  grid-column: 1 / -1;
  margin: 0;
}

.go-url {
  font-size: 0.8125rem;
  white-space: normal;
  word-break: break-all;
}

.go-registry td {
  white-space: normal;
  vertical-align: top;
}

.go-registry td:first-child {
  white-space: nowrap;
}

.go-registry td:nth-child(2) {
  min-width: 200px;
}

.go-registry td:nth-child(3) {
  min-width: 220px;
  max-width: 300px;
}

.go-registry td:nth-child(5) {
  min-width: 220px;
}

.go-registry .go-inline-form .field__input {
  width: 100%;
  min-width: 0;
}

.go-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.go-inline-form .field__input {
  min-width: 180px;
  padding: 6px 10px;
  font-size: 0.8125rem;
}

.go-dash .btn {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.875rem;
}

.go-dash tr.is-new {
  background: var(--mint);
}
