/* Passenger Portal — additional styles layered on top of styles.css */

.portalNav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.portalNavBrand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--brand);
  font-size: 1rem;
}

.portalNavBrand img {
  height: 36px;
  width: auto;
}

.portalNavActions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.portalPage {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.portalPageTitle {
  margin: 0 0 20px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.portalField {
  margin-bottom: 14px;
}

.portalField label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.portalInput {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s;
}

.portalInput:focus {
  outline: none;
  border-color: var(--brand);
}

.portalBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.portalBtn:active { transform: scale(0.97); }
.portalBtn:disabled { opacity: 0.5; cursor: not-allowed; }

.portalBtnPrimary { background: var(--brand); color: #fff; }
.portalBtnPrimary:not(:disabled):hover { background: var(--brand-deep); }
.portalBtnSecondary { background: var(--brand-soft); color: var(--brand-deep); }
.portalBtnDanger { background: #dc2626; color: #fff; }
.portalBtnGhost { background: transparent; color: var(--muted); border: 1.5px solid var(--line); }

.portalBtnFull { width: 100%; }

.portalDivider {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 18px 0;
  position: relative;
}

.portalDivider::before,
.portalDivider::after {
  content: "";
  display: inline-block;
  width: 40%;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 8px;
}

.portalAlert {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.portalAlertError { background: #fee2e2; color: #b91c1c; }
.portalAlertInfo { background: var(--brand-soft); color: var(--brand-deep); }
.portalAlertSuccess { background: #dcfce7; color: #15803d; }

.bookingCard {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--panel-strong);
  transition: border-color 0.15s;
}

.bookingCard:hover { border-color: var(--brand); }

.bookingCardHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.bookingCardRoute {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.bookingCardMeta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 2px;
}

.statusPill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.statusPill.confirmed, .statusPill.paid { background: #dcfce7; color: #15803d; }
.statusPill.cancelled { background: #fee2e2; color: #b91c1c; }
.statusPill.unpaid, .statusPill.pending { background: var(--accent-soft); color: #92400e; }
.statusPill.boarded { background: #dbeafe; color: #1d4ed8; }

.bookingCardActions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ticketBox {
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 480px;
  margin: 0 auto;
}

.ticketRow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.ticketRow:last-child { border-bottom: none; }

.ticketLabel {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ticketValue {
  font-weight: 700;
  text-align: right;
}

.stepIndicator {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  justify-content: center;
}

.stepDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s;
}

.stepDot.active { background: var(--brand); }
.stepDot.done { background: var(--brand-soft); border: 2px solid var(--brand); }

.portalSkeleton {
  background: linear-gradient(90deg, var(--line) 25%, var(--bg) 50%, var(--line) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s infinite;
  border-radius: var(--radius-md);
  height: 20px;
  margin-bottom: 8px;
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.portalEmpty {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.portalEmpty p { margin: 0; font-size: 0.95rem; }

.portalLink {
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}

.refCodeBox {
  background: var(--brand-soft);
  border: 2px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  margin: 16px 0;
}

.refCodeValue {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--brand-deep);
  letter-spacing: 0.1em;
  font-family: monospace;
}

.refCodeLabel {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.termsBox {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 0.82rem;
  color: var(--muted);
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 14px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.portalCheckbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.portalCheckbox input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.passwordStrengthBar {
  height: 4px;
  border-radius: 2px;
  margin-top: 6px;
  background: var(--line);
  overflow: hidden;
}

.passwordStrengthFill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.2s, background 0.2s;
}

@media print {
  .portalNav, .bookingCardActions, .portalBtnGroup, .portalBtn, button { display: none !important; }
  .ticketBox { border: 2px solid #333; }
  body { background: white; }
}

.portalBtnGroup {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.tripOption {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.tripOption:hover, .tripOption.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.tripOptionTime { font-weight: 700; font-size: 1rem; }
.tripOptionMeta { font-size: 0.82rem; color: var(--muted); margin-top: 2px; }
