a {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Combine with hstack (and vstack) to get rid of Bootstrap's default
   centering alignment -- see hyperphor.nlq.frontend.sql-query/ui, whose
   top-level card-stack/results row already carries this class waiting for
   an app stylesheet to define it (same fix as okc's own okc.css). Without
   this, the (usually much shorter) query-card column sits vertically
   centered against the taller results column instead of top-aligned. */
.istack {
  align-items: inherit;
}

/* ── Site header ──────────────────────────────────────────────────────── */
/* Colors/gradient match hyperphor.com's own header exactly (its inline
   <style>, checked 2026-08-20) -- reusing the real Hyperphor brand rather
   than inventing a new palette for this one small demo app. On every page
   (app-ui), not just the about tab. */

.site-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #b08968 0%, #8b9a8e 50%, #9d8b88 100%);
  color: #fff;
  padding: 16px 32px;
  margin-bottom: 20px;
}

.site-hero h2 {
  margin: 0;
  font-size: 1.6em;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Pushed to the far right of the flex header, title stays left. */
.site-hero-logo-link {
  margin-left: auto;
  flex: 0 0 auto;
  line-height: 0; /* no extra gap under the inline img */
}

.site-hero-logo {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

/* ── Top nav (hyperphor.way.tabs/tabs-nav) ───────────────────────────────
   That component hardcodes Bootstrap's boxed nav-tabs markup -- restyled
   here into a plain horizontal link row per design/ui-makeover.md ("get
   rid of the tabs or make them look more like a web app"). text-transform
   also papers over tabs.cljs's humanize, which only replaces "_" with " "
   and doesn't capitalize (so a :home/:schema keyword renders lowercase). */

.nav-tabs {
  border-bottom: 1px solid #e3e3e3;
  padding: 0 32px;
  gap: 28px;
}

.nav-tabs .nav-item {
  margin-bottom: 0;
}

.nav-tabs .nav-link {
  border: none;
  border-radius: 0;
  padding: 12px 2px;
  color: #4a4a4a;
  font-weight: 500;
  text-transform: capitalize;
  border-bottom: 3px solid transparent;
}

.nav-tabs .nav-link:hover {
  color: #2f2f2f;
  text-decoration: none;
}

.nav-tabs .nav-link.active {
  color: #7a8a7f; /* echoes the site-hero gradient's sage tone */
  border-bottom-color: #7a8a7f;
  background: none;
}

/* ── Home page: intro line, above the query box ──────────────────────────
   Replaces the old bootstrap alert-info box -- plain editorial text, same
   max-width/centering as .query-hero below it so the two visually align. */

.home-intro {
  max-width: 900px;
  margin: 24px auto 16px auto;
  padding: 12px 16px;
  background: #f4f2ee;
  border: 1px solid #e3e0da;
  border-radius: 10px;
  color: #4a4a4a;
  font-size: 1.05em;
  line-height: 1.5;
}

.home-intro a {
  font-weight: 600;
  white-space: nowrap;
}

/* ── Home page: big, obvious query box ───────────────────────────────────
   hyperphor.nlq.frontend.qbox/ui hardcodes its own textarea/select inline
   styles (width, font-size, margins) -- overridden here with !important
   since inline style otherwise wins. See design/ui-makeover.md. */

.query-hero {
  max-width: 900px;
  margin: 0 auto 24px auto;
  padding: 24px 28px;
  border: 2px solid #e3e0da;
  border-radius: 10px;
}

.query-hero textarea.form-control {
  width: 100% !important;
  min-height: 70px;
  font-size: 20px !important;
  padding: 14px !important;
}

.query-hero button.btn-primary {
  font-size: 17px;
  padding: 10px 26px;
}

.query-hero select.form-control {
  width: 100% !important;
  margin-left: 0 !important;
  margin-top: 10px;
  font-size: 15px !important;
}

/* ── Home page: results grid + side-cards, below the query box ──────────
   Grid-first/wide + cards-second/narrow -- the mirror image of sql-query/
   ui's own cards-first/narrow + grid-second/wide, per design/ui-makeover.md
   ("below that, the data grid and side-cards"). */

.results-row {
  align-items: flex-start;
  margin: 0 8px;
}

.results-grid {
  flex: 1 1 auto;
  min-width: 0;
  height: 65vh; /* ag-grid needs an explicit container height, see below */
}

.results-side {
  flex: 0 0 380px;
  max-width: 380px;
}

/* ── About tab ────────────────────────────────────────────────────────── */

.about-credits {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #e3e3e3;
  font-size: 0.9em;
  color: #6b6b6b;
}

.about-credits p {
  margin: 0 0 4px 0;
}

.about-credits a {
  color: #7a8a7f;
}

.credit-logo {
  height: 16px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
  border-radius: 2px;
}

/* ── Visualize tab: data summary box ─────────────────────────────────── */

.viz-data-summary {
  padding: 12px 16px;
  margin-bottom: 12px;
  background: #f4f2ee;
  border: 1px solid #e3e0da;
  border-radius: 8px;
  font-size: 0.9em;
  color: #4a4a4a;
}

.viz-details {
  /* remove default browser outline on focus */
}

.viz-details summary {
  list-style: none; /* hide default triangle in some browsers */
}

.viz-details summary::-webkit-details-marker {
  display: none;
}

/* The visible summary bar */
.viz-summary-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  line-height: 1.6;
  padding: 2px 0;
}

.viz-summary-header::before {
  content: "▸";
  font-size: 1.4em;
  font-weight: 900;
  color: #5a7a6a;
  flex: 0 0 auto;
  line-height: 1;
}

.viz-details[open] .viz-summary-header::before {
  content: "▾";
}

.viz-summary-header:hover::before {
  color: #2f2f2f;
}

.viz-summary-header:hover {
  color: #2f2f2f;
}

.viz-summary-counts {
  font-weight: 600;
  color: #3a3a3a;
}

.viz-summary-nl {
  font-weight: 400;
  color: #6b6b6b;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viz-summary-detail {
  margin-top: 8px;
  border-top: 1px solid #e3e0da;
  padding-top: 6px;
}

.viz-no-data {
  color: #888;
  font-style: italic;
}

.viz-col-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}

.viz-col-table th,
.viz-col-table td {
  padding: 5px 12px;
  vertical-align: top;
  line-height: 1.4;
}

/* Header row */
.viz-col-table thead tr {
  border-bottom: 2px solid #c8c3bb;
}

.viz-col-table th {
  font-weight: 700;
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7a8a7f;
}

/* Alternating row bands */
.viz-col-table tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.03);
}

/* Vertical rule between kind and fields columns */
.viz-col-kind {
  white-space: nowrap;
  font-weight: 700;
  color: #3a3a3a;
  width: 1%;           /* shrink to content */
  border-right: 1px solid #d4cfc8;
}

.viz-col-fields {
  word-break: break-word;
  color: #4a4a4a;
}

/* ── NL_query tab ─────────────────────────────────────────────────────── */
/* ag-grid needs an explicit height on its container to render any rows --
   without one it silently renders a 0-height viewport (row count/header
   still correct, but no rows visible). hyperphor.nlq.frontend.sql-query's
   inspector-grid passes :class "aggrid-inspector" expecting the consuming
   app to size it (same contract okc.css fulfills for okc's own inspector). */
.aggrid-inspector {
  width: 100%;
  height: 60vh;
}
