/*
 * Growth Partner — permit show page, UX overhaul phase 3c.
 *
 * Spec: docs/ux-overhaul/mockup/Vergunning.dc.html (the .steps row and the
 * .split > .wide / .rail layout). Contracts: docs/architecture/pages.md
 * ("Permit show"). The sticky bar and details card live in ux_lead.css.
 *
 * Phone rules at the bottom of the file. Text colours via the --gp-* tokens.
 */

/* ── Progress steps (details card) ──
   The gp-steps component, with a second line under a step for the real
   submission date (step 1) or the registry's own state (step 3). */
.cockpit-progress { margin: 0; }
.cockpit-progress > li { margin: 0; list-style: none; }
.cockpit-progress .gp-step { align-items: flex-start; }
.cockpit-progress .gp-step-bar { align-self: center; }
.cockpit-progress-text { display: flex; flex-direction: column; line-height: 1.25; padding-top: 2px; }
.cockpit-progress-detail { font-weight: 600; font-size: 0.8rem; color: var(--gp-body); }

/* ── Overzicht: main column + action rail ──
   The rail comes FIRST in the DOM (a phone reads actions first); on desktop
   the grid areas put it on the right. */
.permit-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  grid-template-areas: "main rail";
  gap: 22px;
  align-items: start;
}
.permit-overview > .permit-main {
  grid-area: main; min-width: 0;
  display: flex; flex-direction: column; gap: 22px;
}
.permit-overview > .permit-rail {
  grid-area: rail; min-width: 0;
  display: flex; flex-direction: column; gap: 16px;
}
/* The column gap owns the spacing (Pico articles and .todos-section bring
   their own margins). */
.permit-overview .permit-main > *, .permit-overview .permit-rail > * { margin: 0; }

/* "Wat is dit?" beside Locatie while each keeps a usable width; below that
   they stack (a squeezed map is useless). Overrides application.css's fixed
   two-column .permit-split, which assumed the full page width. */
.permit-overview .permit-split {
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 22px;
}

/* ── Rail cards ── */
.permit-rail .gp-eyebrow { font-size: 0.75rem; }
.permit-rail .todos-section { scroll-margin-top: 8rem; }

.permit-rail-call-who { display: flex; flex-direction: column; margin: 0; }
.permit-rail-call-name { font-weight: 700; color: var(--gp-ink); }
.permit-rail-call-company { font-size: 0.85rem; color: var(--gp-body); }
.permit-rail-call-btn { width: 100%; height: 44px; }

/* Status control spans the card: three equal segments read as one choice. */
.permit-rail-kwalificatie form { margin: 0; }
.permit-rail-kwalificatie .status-segmented { display: flex; width: 100%; }
.permit-rail-kwalificatie .status-segment { flex: 1 1 0; justify-content: center; padding-left: 0.4rem; padding-right: 0.4rem; }
.permit-rail-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.permit-rail-buttons button { width: auto; margin: 0; }

.permit-rail-vastleggen form { margin: 0; }

/* ── Single column: tablets and phones ──
   Rail first (DOM order), then narrative, locatie, bedrijf, tijdlijn. */
@media (max-width: 1100px) {
  .permit-overview { grid-template-columns: minmax(0, 1fr); grid-template-areas: "rail" "main"; }
}

/* ── Phone rules ── */
@media (max-width: 768px) {
  .permit-overview, .permit-main, .permit-overview .permit-split { gap: 16px; }

  /* Steps stack: three wrapped steps with bars between them read as noise. */
  .cockpit-progress { flex-direction: column; align-items: flex-start; gap: 4px; }
  .cockpit-progress .gp-step-bar { flex: none; width: 2px; height: 10px; min-width: 0; margin-left: 10px; align-self: flex-start; }

  /* Touch targets >= 40px. */
  .permit-rail-kwalificatie .status-segment { min-height: 40px; }
  .permit-rail-buttons button { min-height: 40px; }
}
