/*
 * Growth Partner — lead pages (company + permit show), UX overhaul phase 3.
 *
 * Spec: the <header class="card stick"> bar and the card right under it in
 * docs/ux-overhaul/mockup/Bedrijf.dc.html. Contracts: docs/architecture/pages.md.
 *
 * Phone rules at the bottom of the file. Text colours via the --gp-* tokens.
 */

/* ── Slim sticky cockpit bar ──
   Holds ONLY score, name, the call button and the tab bar. Height budget:
   <= 110px on desktop, <= 120px at 390px wide (system tests in
   company_tabs_test.rb / permit_show_test.rb measure it). Anything that would
   make it taller belongs in .gp-cockpit-details below. */
.gp-cockpit-bar {
  position: sticky; top: 0; z-index: 20;
  gap: 6px; padding: 10px 20px 0; margin-bottom: 12px;
}
.gp-cockpit-bar-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; min-width: 0;
}

/* The name is ONE line, cut off with an ellipsis: a wrapped two-line name is
   what grew the old cockpit. The full name is in the title attribute. */
.gp-cockpit-bar .cockpit-name {
  flex: 1 1 0; min-width: 0; margin: 0;
  font-family: var(--gp-font-heading); font-weight: 700;
  font-size: 1.2rem; line-height: 1.25; color: var(--gp-navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Score: the shared score block (stream target, same partial everywhere),
   restyled as a compact tile. The "Score" caption stays in the accessibility
   tree, only its box goes (never display:none — that drops the name). */
.gp-cockpit-bar .show-score {
  margin: 0; padding: 0;
  background: none; border: 0; border-radius: 0;
}
.gp-cockpit-bar .show-score-label {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.gp-cockpit-bar .show-score-value {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 6px; border-radius: 10px;
  font-size: 1.1rem; line-height: 1;
}

.gp-cockpit-call { flex: none; }
.gp-cockpit-call-icon { display: inline-flex; }
.gp-cockpit-call-icon svg { width: 16px; height: 16px; }

/* Tabs: the bar's bottom edge. One row that scrolls sideways, never wraps. */
.gp-cockpit-bar .tab-bar {
  flex-wrap: nowrap; margin: 0; border-bottom: 0;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
}
.gp-cockpit-bar .tab { flex: none; margin-bottom: 0; white-space: nowrap; }

/* ── Details card (not sticky) ──
   Everything the old cockpit pinned besides the four bar items, in the same
   order: reference chip, address + rooftop, activity, chips. The card's gap
   replaces the rows' own top margins. */
.gp-cockpit-details { gap: 10px; margin-bottom: 1rem; }
.gp-cockpit-details > .title-chip { align-self: flex-start; }
.gp-cockpit-details > .cockpit-address,
.gp-cockpit-details > .cockpit-activity-row,
.gp-cockpit-details > .cockpit-chips { margin-top: 0; }

/* ── Phone rules ── */
@media (max-width: 768px) {
  .gp-cockpit-bar { padding: 8px 14px 0; gap: 4px; }
  .gp-cockpit-bar .cockpit-name { font-size: 1.05rem; }
  .gp-cockpit-bar .tab { min-height: 40px; padding: 0.45rem 0.75rem; }
}
