/*
 * Teahub global Gitea accent layer.
 * Intentionally small: prefer upstream Gitea structure and variables over selector overrides.
 */
:root {
  --color-primary: #6f9b78;
  --color-primary-contrast: #ffffff;

  --color-primary-dark-1: #618a69;
  --color-primary-dark-2: #54795b;
  --color-primary-dark-3: #47694e;
  --color-primary-dark-4: #3b5842;

  --color-primary-light-1: #7da985;
  --color-primary-light-2: #8db795;
  --color-primary-light-3: #9fc5a6;
  --color-primary-light-4: #b4d3b9;
  --color-primary-light-5: #c9e0cd;
  --color-primary-light-6: #deebdf;
  --color-primary-light-7: #eff6f0;

  --color-primary-alpha-10: #6f9b7819;
  --color-primary-alpha-20: #6f9b7833;
  --color-primary-alpha-30: #6f9b784d;
  --color-primary-alpha-40: #6f9b7866;
  --color-primary-alpha-50: #6f9b7880;
  --color-primary-alpha-60: #6f9b7899;
  --color-primary-alpha-70: #6f9b78b3;
  --color-primary-alpha-80: #6f9b78cc;
  --color-primary-alpha-90: #6f9b78e6;

  --color-primary-hover: var(--color-primary-dark-1);
  --color-primary-active: var(--color-primary-dark-2);
  --color-accent: var(--color-primary);
  --color-small-accent: var(--color-primary-light-5);

  accent-color: var(--color-accent);
}


/* Teahub mark: keep Gitea's home/feed link semantics, replace only the visual logo. */
#navbar-logo img {
  display: none;
}
#navbar-logo::before {
  content: "🍵 Teahub";
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  white-space: nowrap;
}

/* Classic Gitea experiment: native dashboard with Teahub tools layered on top. */
#teahub-classic-tools {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1100;
  width: min(22rem, calc(100vw - 2rem));
  display: grid;
  gap: .6rem;
}
.teahub-classic-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.teahub-classic-card {
  border: 1px solid var(--color-primary-light-5);
  border-radius: .85rem;
  background: var(--color-body);
  box-shadow: 0 .75rem 2.25rem rgba(0,0,0,.12);
  padding: .75rem;
}
.teahub-classic-card[hidden] { display: none; }
.teahub-classic-card-title {
  font-weight: 700;
  color: var(--color-text);
}
.teahub-classic-usage-widget {
  display: block;
  width: 100%;
  height: auto;
  margin-top: .65rem;
}
.teahub-classic-thread {
  min-height: 7rem;
  max-height: 18rem;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: .5rem;
  margin: .7rem 0;
}
.teahub-classic-turn {
  max-width: 92%;
  padding: .55rem .65rem;
  border-radius: .72rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.teahub-classic-turn-user {
  justify-self: end;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}
.teahub-classic-turn-agent {
  justify-self: start;
  background: var(--color-secondary);
  color: var(--color-text);
}
.teahub-classic-form textarea { resize: vertical; }
@media (max-width: 720px) {
  #teahub-classic-tools {
    right: .5rem;
    bottom: .5rem;
    width: calc(100vw - 1rem);
  }
  .teahub-classic-usage-widget { max-height: 7rem; object-fit: contain; }
}


/* Tea usage follows stock Gitea sidebar styling; only the meter internals are custom. */
.teahub-native-usage-grid { display:grid; gap:.5rem; }
.teahub-native-usage-row { display:grid; grid-template-columns:3.2rem minmax(0,1fr) 2.6rem; gap:.5rem; align-items:center; }
.teahub-native-usage-name { font-size:.78rem; font-weight:600; color:var(--color-text); }
.teahub-native-usage-track { height:.45rem; overflow:hidden; border-radius:999px; background:var(--color-secondary); }
.teahub-native-usage-fill { display:block; height:100%; border-radius:inherit; background:var(--color-primary); }
.teahub-native-usage-value { color:var(--color-text-light-2); font-size:.75rem; text-align:right; font-variant-numeric:tabular-nums; }
.teahub-native-usage .header a { color:var(--color-primary-dark-1); text-decoration:none; }
