/* =========================================================================
   HUT HJ - Cek Kursi Bus
   Dipakai bersama assets_register/css/register.css (header, card, input).
   ========================================================================= */

.sp-stack > * + * { margin-top: 14px; }

/* register.css menarik card ke atas (-14px) agar menumpuk header; di
   halaman ini card pertama diberi jarak supaya tidak tampak terpotong. */
.sp-stack > .hj-card:first-child { margin-top: 16px; }

@media (min-width: 768px) {
  .sp-stack > .hj-card:first-child { margin-top: 24px; }
}

.sp-card { padding: 20px 18px; }

@media (min-width: 768px) {
  .sp-card { padding: 24px 26px; }
}

.sp-count {
  margin: 20px 2px 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--hj-muted);
}

.sp-tips {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 14px;
}

/* ============================ Hasil ============================ */

.sp-result__name {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--hj-ink);
  overflow-wrap: anywhere;
}

.sp-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
}

@media (min-width: 480px) {
  .sp-facts { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
}

.sp-facts__item {
  padding: 12px 14px;
  border: 1px solid var(--hj-line);
  border-radius: var(--hj-radius-sm);
  background: var(--hj-bg);
}

.sp-facts dt {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hj-muted);
  margin-bottom: 4px;
}

.sp-facts dd { margin: 0; }

.sp-facts__bus {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--hj-primary-dark);
}

.sp-facts__note {
  margin-top: 2px !important;
  font-size: 13px;
  color: var(--hj-body);
}

.sp-seats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sp-seats__chip {
  min-width: 40px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--hj-primary);
  color: var(--hj-on-primary, #fff);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ============================ Denah ============================ */

.sp-map { margin-top: 14px; }

.sp-map summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--hj-primary);
  padding: 6px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

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

.sp-map summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}

.sp-map[open] summary::after { transform: translateY(2px) rotate(-135deg); }

@media (prefers-reduced-motion: reduce) {
  .sp-map summary::after { transition: none; }
}

.sp-map summary:focus-visible {
  outline: 2px solid var(--hj-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.sp-bus {
  max-width: 280px;
  margin: 8px auto 0;
  padding: 12px 14px 10px;
  border: 2px solid var(--hj-line);
  border-radius: 28px 28px 14px 14px;
  background: #fff;
}

.sp-bus__front,
.sp-bus__back {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hj-muted);
}

.sp-bus__front {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--hj-line);
}

.sp-bus__back {
  text-align: center;
  padding-top: 8px;
  margin-top: 10px;
  border-top: 1px dashed var(--hj-line);
}

/* Kolom A-F seperti di Excel; kolom C adalah lorong. */
.sp-bus__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.sp-seat {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1.5px solid var(--hj-line);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hj-muted);
  font-variant-numeric: tabular-nums;
}

.sp-seat.is-mine {
  background: var(--hj-primary);
  border-color: var(--hj-primary);
  color: var(--hj-on-primary, #fff);
  font-weight: 800;
}

.sp-door {
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hj-muted);
}

.sp-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--hj-muted);
}

.sp-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sp-legend .sp-seat {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

/* ============================ PIC ============================ */

.sp-pic {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hj-line);
  font-size: 13.5px;
}

.sp-pic__title {
  display: block;
  font-weight: 700;
  color: var(--hj-ink);
  margin-bottom: 2px;
}

.sp-pic ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sp-pic a {
  color: var(--hj-primary);
  font-weight: 600;
  white-space: nowrap;
}

.sp-info-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--hj-line);
  color: var(--hj-primary);
  font-size: 14px;
  font-weight: 700;
}
