/* ==========================================================================
   PAIRMYKEY DEMO

   A working miniature of the PairMyKey phone app: pick a vehicle, get the
   immobiliser options, walk the guided programming steps.

   Written rather than ported, but not guessed. PairMyKey is a Flutter mobile
   app (C:\laragon\www\pairmykey), so there is no markup or stylesheet to
   lift. The screens, the wording and the flow come from its Dart source:
   lib/screens/dashboard_screen.dart, make_model_year/mmy_screen.dart,
   immos/immos_screen.dart and steps/pi_steps_screen.dart. The palette is the
   app's own, the four colours its widgets use most: #0e1014, #26a2f0,
   #b6e7ff and #1a1f26. The vehicles and jobs are invented.

   It is drawn as a phone because that is what it is. The other demos are
   desktop software; this one lives in a technician's hand on a driveway.

   Everything is namespaced .pmk-* and scoped under .pmk-demo.
   ========================================================================== */

.pmk-demo {
  --pmk-bg: #0e1014;
  --pmk-surface: #1a1f26;
  --pmk-line: #2a323d;
  --pmk-blue: #26a2f0;
  --pmk-pale: #b6e7ff;
  --pmk-cyan: #02effe;
  --pmk-slate: #2d4053;
  --pmk-dim: #8a97a6;

  position: absolute;
  inset: 0;
  display: grid;
  /* Copy on the left, handset on the right. The other demos are desktop
     products that fill the screen; a phone on its own left most of the frame
     empty, so the space beside it carries the explanation. */
  grid-template-columns: minmax(0, 430px) auto;
  justify-content: center;
  align-items: center;
  gap: clamp(32px, 5vw, 76px);
  padding: 26px clamp(30px, 5vw, 80px);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* The room around the phone, so it reads as a device on a bench rather than
     a screenshot floating in white. */
  background:
    radial-gradient(90% 70% at 50% 0%, #16202c, #0b0e12 70%);
  text-align: left;
  overflow: hidden;
}
.pmk-demo *,
.pmk-demo *::before,
.pmk-demo *::after { box-sizing: border-box; }
.pmk-demo,
.pmk-demo :where(button) { cursor: default; font: inherit; color: inherit; }
.pmk-demo :where(button) { background: none; border: 0; padding: 0; text-align: left; }
.pmk-demo [data-pmk] { cursor: pointer; }

/* ---------------- the panel beside the phone ---------------- */
.pmk-side {
  max-width: 430px;
}
.pmk-side__mark {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.pmk-side__mark b { color: var(--pmk-cyan); font-weight: 800; }
.pmk-side__lede {
  margin: 12px 0 26px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #9fadbc;
}
.pmk-side__list { display: grid; gap: 16px; }
.pmk-side__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.pmk-side__item > span:last-child { min-width: 0; }
.pmk-side__item b {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #eaf2f9;
  margin-bottom: 2px;
}
.pmk-side__item b + span {
  display: block;
  font-size: 12.5px;
  line-height: 1.55;
  color: #8a97a6;
}
.pmk-side__dot {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(38, 162, 240, 0.13);
  color: var(--pmk-blue);
}
.pmk-side__dot svg { width: 16px; height: 16px; }

/* ---------------- the phone ---------------- */
.pmk-phone {
  width: 306px;
  height: 620px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 36px;
  background: var(--pmk-bg);
  border: 8px solid #05070a;
  box-shadow:
    0 0 0 1px #2b333d,
    0 40px 80px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  position: relative;
}
/* The notch, so the dark rectangle reads as a handset. */
.pmk-phone::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 108px;
  height: 20px;
  border-radius: 0 0 12px 12px;
  background: #05070a;
  z-index: 3;
}
.pmk-status {
  display: flex;
  align-items: center;
  padding: 6px 18px 2px;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
}
.pmk-status__right { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.pmk-status__bat {
  width: 16px;
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 2px;
  position: relative;
}
.pmk-status__bat::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  right: 5px;
  background: #fff;
  border-radius: 1px;
}

/* ---------------- app bar ---------------- */
.pmk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 10px;
  color: #fff;
}
.pmk-bar__back {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--pmk-surface);
  color: var(--pmk-pale);
}
.pmk-bar__back svg { width: 13px; height: 13px; }
.pmk-bar__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pmk-bar__logo { margin-left: auto; height: 15px; opacity: 0.9; }

/* ---------------- body ---------------- */
.pmk-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 14px 14px;
}
.pmk-label {
  display: block;
  margin: 4px 0 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--pmk-dim);
}

/* connected-dongle strip */
.pmk-dongle {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  margin-bottom: 12px;
  border-radius: 11px;
  background: linear-gradient(120deg, rgba(38, 162, 240, 0.18), rgba(38, 162, 240, 0.04));
  border: 1px solid rgba(38, 162, 240, 0.3);
  color: #fff;
}
.pmk-dongle__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pmkPulse 2.2s ease-out infinite;
}
@keyframes pmkPulse {
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.pmk-dongle__name { font-size: 11px; font-weight: 700; }
.pmk-dongle__sub { display: block; font-size: 9px; color: var(--pmk-pale); }
.pmk-dongle__credits {
  margin-left: auto;
  text-align: right;
  font-size: 9px;
  color: var(--pmk-dim);
}
.pmk-dongle__credits b { display: block; font-size: 13px; color: #fff; }

/* action cards on the dashboard */
.pmk-action {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--pmk-surface);
  border: 1px solid var(--pmk-line);
  color: #fff;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.pmk-action:hover { border-color: var(--pmk-blue); transform: translateY(-1px); }
.pmk-action__icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(38, 162, 240, 0.16);
  color: var(--pmk-blue);
}
.pmk-action__icon svg { width: 16px; height: 16px; }
.pmk-action__title { display: block; font-size: 12px; font-weight: 700; }
.pmk-action__text { display: block; font-size: 9.5px; color: var(--pmk-dim); }
.pmk-action__go { margin-left: auto; color: var(--pmk-dim); }
.pmk-action__go svg { width: 13px; height: 13px; }
.pmk-action--primary {
  background: linear-gradient(120deg, var(--pmk-blue), #1b7fc4);
  border-color: transparent;
}
.pmk-action--primary .pmk-action__icon { background: rgba(255, 255, 255, 0.2); color: #fff; }
.pmk-action--primary .pmk-action__text { color: rgba(255, 255, 255, 0.85); }
.pmk-action--primary .pmk-action__go { color: rgba(255, 255, 255, 0.9); }

/* the make / model / year picker */
.pmk-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}
.pmk-crumb span {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(38, 162, 240, 0.15);
  border: 1px solid rgba(38, 162, 240, 0.3);
  font-size: 9px;
  font-weight: 600;
  color: var(--pmk-pale);
}
.pmk-list { display: grid; gap: 6px; }
.pmk-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--pmk-surface);
  border: 1px solid var(--pmk-line);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pmk-row:hover { border-color: var(--pmk-blue); background: #1f262f; }
.pmk-row__go { margin-left: auto; color: var(--pmk-dim); }
.pmk-row__go svg { width: 12px; height: 12px; }
.pmk-row__tag {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(2, 239, 254, 0.14);
  color: var(--pmk-cyan);
  font-size: 8.5px;
  font-weight: 700;
}

/* immobiliser cards */
.pmk-immo {
  display: block;
  width: 100%;
  padding: 11px 12px;
  margin-bottom: 8px;
  border-radius: 11px;
  background: var(--pmk-surface);
  border: 1px solid var(--pmk-line);
  color: #fff;
  transition: border-color 0.15s ease;
}
.pmk-immo:hover { border-color: var(--pmk-blue); }
.pmk-immo__top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.pmk-immo__name { font-size: 11.5px; font-weight: 700; }
.pmk-immo__id {
  margin-left: auto;
  font-size: 8.5px;
  color: var(--pmk-dim);
  font-variant-numeric: tabular-nums;
}
.pmk-immo__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.pmk-chip {
  padding: 2px 7px;
  border-radius: 5px;
  background: #232b35;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--pmk-pale);
}
.pmk-chip--step { background: rgba(38, 162, 240, 0.18); color: var(--pmk-blue); }

/* the guided steps */
.pmk-prog {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 11px;
}
.pmk-prog__track {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: #232b35;
  overflow: hidden;
}
.pmk-prog__fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--pmk-blue), var(--pmk-cyan));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.pmk-prog__n { font-size: 9px; font-weight: 700; color: var(--pmk-pale); }

.pmk-step {
  display: flex;
  gap: 10px;
  padding: 10px 11px;
  margin-bottom: 7px;
  border-radius: 11px;
  background: var(--pmk-surface);
  border: 1px solid var(--pmk-line);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.pmk-step__n {
  width: 21px;
  height: 21px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #232b35;
  color: var(--pmk-dim);
  font-size: 9.5px;
  font-weight: 700;
}
.pmk-step__text { font-size: 10.5px; line-height: 1.5; color: #cfd8e3; }
.pmk-step.is-done { opacity: 0.55; }
.pmk-step.is-done .pmk-step__n { background: #22c55e; color: #04210f; }
.pmk-step.is-now { border-color: var(--pmk-blue); }
.pmk-step.is-now .pmk-step__n { background: var(--pmk-blue); color: #04223a; }
.pmk-step.is-now .pmk-step__text { color: #fff; }

.pmk-cta {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border-radius: 11px;
  background: var(--pmk-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: filter 0.15s ease;
}
.pmk-cta:hover { filter: brightness(1.08); }
.pmk-cta--done { background: #22c55e; color: #04210f; }

/* ---------------- narrow ---------------- */
/* Below this the panel and the phone start fighting for the same room, so the
   handset keeps it and the copy drops. */
@media (max-width: 1180px) {
  .pmk-demo {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding: 22px;
  }
  .pmk-side { display: none; }
}
@media (max-width: 900px) {
  .pmk-demo { padding: 14px; }
  .pmk-phone { width: 270px; height: 540px; }
}

/* The phone is centred by the grid, so unlike the other demos this pane does
   have in-flow height. It is still pinned so the frame never collapses. */
.kore-demo__pane[data-demo-pane="pairmykey"] { min-height: 700px; }
@media (max-width: 900px) {
  .kore-demo__pane[data-demo-pane="pairmykey"] { min-height: 580px; }
}
