/**
 * 3×2 ISO Jurisdiction Header Matrix — index + driver + kiosk (sw.md § Jurisdiction Matrix).
 */
@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@700;800;900&family=Rajdhani:wght@600;700&display=swap");

:root {
  --sw-font-display: "Orbitron", "Rajdhani", system-ui, -apple-system, sans-serif;
  --sw-cyan: #00f0ff;
  --sw-border: 1px solid rgba(0, 240, 255, 0.35);
  --sw-chrome-glow: 0 0 10px rgba(0, 240, 255, 0.75);
}

.essex-lion-banner-wrap,
body.cp77-app .essex-lion-banner-wrap,
#driverEssexLionBannerWrap.essex-lion-banner-wrap,
#essexLionBannerWrap.essex-lion-banner-wrap {
  padding-top: 18px !important;
  padding-bottom: 12px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 36px !important;
}

.essex-lion-banner-wrap .essex-lion-banner-svg {
  flex: 0 1 auto;
}

.sw-crest-horizon-divider {
  height: 1px;
  width: 84%;
  max-width: 380px;
  margin: 0 auto 14px auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 240, 255, 0.55) 50%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
  border: none;
  flex-shrink: 0;
}

.sw-unified-header-chrome,
.rider-card-chrome.sw-unified-header-chrome,
.top-mts-bar.sw-unified-header-chrome {
  width: 100% !important;
  max-width: var(--sw-app-max-w, 480px) !important;
  margin: 0 auto 10px auto !important;
  padding: 0 var(--sw-app-gutter, 16px) !important;
  border-bottom: none !important;
  box-sizing: border-box !important;
}

.sw-unified-chrome-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

/* —— Master 2-Row Header Lock: Row 1 (GADMATH | SW | USERNAME) + Row 2 (Elastic Full-ISO Pill) —— */
.sw-jurisdiction-matrix,
.sw-header-pyramid {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sw-pyramid-row {
  width: 100%;
  box-sizing: border-box;
}

.sw-macro-pill {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  height: 42px !important;
  width: calc(100% - 28px) !important;
  max-width: 400px !important;
  margin: 0 auto !important;
  border-radius: 9999px;
  padding: 0 12px;
  background: rgba(11, 9, 20, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
  box-sizing: border-box;
}

/* Row 1 — GADMATH | SW | USERNAME typography while preserving GADMATH <-> GODMATH (A <-> O) glitch */
.sw-macro-pill span:not(.sw-macro-sep):not(.gadmath-o-swap):not(.gadmath-scan):not(.gadmath-o-letter):not(.gadmath-ao-glyph),
.sw-macro-pill button.sw-macro-name-btn,
.sw-macro-pill #riderUserAccountBtn,
.sw-macro-pill #driverRaylorAccountBtn,
.sw-macro-pill #riderMemberDisplayName,
.sw-macro-pill #mtsDriverDisplayName,
.sw-macro-pill #sw-identity-pill {
  font-family: "Orbitron", "Rajdhani", system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: #00F0FF !important;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.55) !important;
  line-height: 1 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.sw-macro-pill .gadmath-ao-glyph {
  font-family: "Orbitron", "Rajdhani", system-ui, -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
}

.sw-macro-pill .gadmath-ao-glyph.is-godmath-o {
  color: #fcee0a !important;
  text-shadow: 0 0 12px rgba(252, 238, 10, 0.95), 2px 0 0 rgba(255, 42, 109, 0.9) !important;
}

.sw-macro-col {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.sw-macro-col--left,
.sw-macro-col--right {
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  justify-content: center;
  overflow: hidden;
}

.sw-macro-col--center {
  justify-self: center;
  gap: 6px;
}

/* Interactive User/Driver Trigger in Column 3 */
.sw-macro-pill .sw-macro-name-btn,
.sw-macro-pill #riderUserAccountBtn,
.sw-macro-pill #driverRaylorAccountBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 100% !important;
  max-width: 100% !important;
  padding: 0 4px !important;
  margin: 0 !important;
  border-radius: 9999px !important;
  cursor: pointer !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-tap-highlight-color: transparent !important;
  transition: transform 0.12s ease, opacity 0.12s ease !important;
}

.sw-macro-pill .sw-macro-name-btn:active,
.sw-macro-pill #riderUserAccountBtn:active,
.sw-macro-pill #driverRaylorAccountBtn:active {
  transform: scale(0.94) !important;
  opacity: 0.86 !important;
}

/* Hide any legacy standalone Row 2 name row — strictly 2 rows total */
.sw-identity-row {
  display: none !important;
}

/* Row 2 — Single Elastic Full-ISO Module ([ COUNTRY · STATE · COUNTY · CITY ]) */
.sw-iso-row {
  margin: 10px auto 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

#sw-unified-iso-pill.sw-unified-iso-pill,
.sw-unified-iso-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: calc(100vw - 24px) !important;
  height: 28px !important;
  padding: 0 18px !important;
  border-radius: 9999px !important;
  font-family: "Orbitron", "Rajdhani", system-ui, -apple-system, sans-serif !important;
  font-size: clamp(10px, 2.8vw, 11.5px) !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: #00F0FF !important;
  background: rgba(11, 9, 20, 0.9) !important;
  border: 1px solid rgba(0, 240, 255, 0.38) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.14) !important;
  text-shadow: var(--sw-chrome-glow) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  transition: width 180ms ease, max-width 180ms ease !important;
  box-sizing: border-box !important;
}

.sw-gadmath-crisp,
.sw-header-pyramid .sw-chrome-gadmath {
  font-family: var(--sw-font-display) !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--sw-cyan) !important;
  text-shadow: var(--sw-chrome-glow) !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Keep person/county slots clean while letting GADMATH -> GODMATH (A <-> O) glitch run in full CP77 glory */
.sw-header-pyramid #mtsDriverDisplayName .gadmath-o-swap,
.sw-header-pyramid #mtsDriverDisplayName .gadmath-scan,
.sw-header-pyramid #riderMemberDisplayName .gadmath-o-swap,
.sw-header-pyramid #riderMemberDisplayName .gadmath-scan {
  display: none !important;
}

.sw-unified-iso-left,
.sw-unified-iso-right,
#swIsoCountryState .sw-unified-iso-left,
#swIsoCityCode .sw-unified-iso-right {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sw-micro-col--left,
.sw-micro-col--right {
  overflow: hidden;
  min-width: 0;
}

.sw-chrome-gadmath,
.sw-chrome-county,
.mts-sw-mark,
#riderSwMark,
#mtsSwMark,
.sw-macro-pill .cp77-gadmath-type {
  font-family: var(--sw-font-display) !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--sw-cyan) !important;
  text-shadow: var(--sw-chrome-glow) !important;
}

.sw-macro-pill .mts-sw-mark,
.sw-macro-pill #riderSwMark,
.sw-macro-pill #mtsSwMark {
  font-weight: 700 !important;
}

.mts-sw-mark,
#riderSwMark,
#mtsSwMark {
  font-weight: 900 !important;
}

.mts-name-sep,
.sw-macro-sep {
  color: rgba(0, 240, 255, 0.35) !important;
  font-weight: 700;
}

#riderMemberDisplayName .gadmath-o-swap,
#riderMemberDisplayName .gadmath-scan,
#mtsDriverDisplayName .gadmath-o-swap,
#mtsDriverDisplayName .gadmath-scan,
#mtsDriverCountyMark .gadmath-o-swap,
#mtsDriverCountyMark .gadmath-scan,
#riderMemberDisplayName .gadmath-glitch-unit::before,
#riderMemberDisplayName .gadmath-glitch-unit::after,
#mtsDriverDisplayName .gadmath-glitch-unit::before,
#mtsDriverDisplayName .gadmath-glitch-unit::after,
#mtsDriverCountyMark .gadmath-glitch-unit::before,
#mtsDriverCountyMark .gadmath-glitch-unit::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
}

#riderMemberDisplayName,
#mtsDriverDisplayName,
#mtsDriverCountyMark,
#riderMemberDisplayName .gadmath-face,
#mtsDriverDisplayName .gadmath-face,
#mtsDriverCountyMark .gadmath-face {
  animation: none !important;
  filter: none !important;
  transform: none !important;
  opacity: 1 !important;
}

.rider-user-account-pill.sw-chrome-name-pill,
#driverRaylorAccountBtn.rider-user-account-pill {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Rider viewport — optical shield center between matrix and tab bar */
body.cp77-app #viewRider.view-panel.active,
body.cp77-app .app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}

body.cp77-app #viewRider.view-panel.active {
  justify-content: center;
  min-height: calc(100dvh - 230px);
  width: 100%;
}

body.cp77-app #viewRider .summon-arena--rider-home {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  width: 100%;
  min-height: 0;
}

/* Hero shield sizing owned by sw-shield-controller.css */

body.cp77-app #viewRider .summon-arena--rider-home.trip-active {
  min-height: 130px;
  max-height: 140px;
}
