/* carnivaltransportation.app -- public/assets/css/MCM-global-nav.css */
/* v1.0.0 -- Shared tab bar for the main site, /book/ and /p/ (drawn by
   MCM-global-nav.js). Phones: bottom tab bar, 49pt tabs, glass bar with a
   0.5px hairline. Wider screens: a floating bar centered at the bottom so it
   never fights each page's own header. --MCM-global-nav-height tells pages
   how much room to leave; it drops to 0 while typing. System fonts, Inset
   Grouped sign-in sheet, light and dark. */
/* v1.1.0 -- cleaner main site header on wide screens: the tab bar's Sign In
   (or the signed-in tabs) replaces the header's Rider Login and Driver
   Login buttons */

@media (min-width: 901px) {
  html.MCM-global-nav-on .MCM-header-actions {
    display: none;
  }
}

:root {
  --MCM-global-nav-height: 0px;
  --MCM-global-nav-z: 35;
  --MCM-global-nav-bar: rgba(249, 249, 249, 0.94);
  --MCM-global-nav-hairline: rgba(60, 60, 67, 0.29);
  --MCM-global-nav-muted: #8e8e93;
  --MCM-global-nav-tint: #225aa7;
  --MCM-global-nav-ground: #f2f2f7;
  --MCM-global-nav-surface: #ffffff;
  --MCM-global-nav-label: #1c1c1e;
  --MCM-global-nav-secondary: #6c6c70;
  --MCM-global-nav-fill: rgba(118, 118, 128, 0.12);
}

html.MCM-global-nav-on {
  --MCM-global-nav-height: calc(56px + env(safe-area-inset-bottom, 0px));
}

html.MCM-global-nav-on.MCM-global-nav-typing {
  --MCM-global-nav-height: 0px;
}

html.MCM-global-nav-on body {
  padding-bottom: var(--MCM-global-nav-height);
}

.MCM-global-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--MCM-global-nav-z);
  display: grid;
  grid-template-columns: repeat(var(--MCM-global-nav-count, 4), minmax(0, 1fr));
  align-items: stretch;
  min-height: calc(56px + env(safe-area-inset-bottom, 0px));
  padding: 4px max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  background: var(--MCM-global-nav-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transform: translateZ(0);
  transition: transform .25s cubic-bezier(.32, .72, 0, 1), opacity .2s ease;
}

.MCM-global-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--MCM-global-nav-hairline);
  transform: scaleY(.5);
  transform-origin: top;
  pointer-events: none;
}

html.MCM-global-nav-typing .MCM-global-nav,
html.MCM-global-nav-sheet-open .MCM-global-nav {
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
}

.MCM-global-nav-tab {
  min-width: 0;
  min-height: 49px;
  margin: 0;
  padding: 4px 2px 2px;
  border: 0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  color: var(--MCM-global-nav-muted);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s cubic-bezier(.32, .72, 0, 1), color .18s ease;
}

.MCM-global-nav-tab svg {
  flex: 0 0 auto;
  max-width: none;
}

.MCM-global-nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .01em;
}

.MCM-global-nav-tab.is-active {
  color: var(--MCM-global-nav-tint);
}

.MCM-global-nav-tab:active {
  transform: scale(.94);
}

.MCM-global-nav-tab:focus-visible {
  outline: 3px solid rgba(34, 90, 167, .3);
  outline-offset: -3px;
}

/* Wider screens: floating bar, icon and label side by side */
@media (min-width: 768px) {
  html.MCM-global-nav-on {
    --MCM-global-nav-height: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .MCM-global-nav {
    left: 50%;
    right: auto;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    width: max-content;
    max-width: calc(100vw - 32px);
    min-height: 56px;
    padding: 6px;
    gap: 4px;
    border-radius: 999px;
    grid-template-columns: repeat(var(--MCM-global-nav-count, 4), auto);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .14), 0 0 0 .5px var(--MCM-global-nav-hairline);
    transform: translateX(-50%);
  }

  .MCM-global-nav::before {
    display: none;
  }

  html.MCM-global-nav-typing .MCM-global-nav,
  html.MCM-global-nav-sheet-open .MCM-global-nav {
    transform: translate(-50%, 140%);
  }

  .MCM-global-nav-tab {
    min-height: 44px;
    flex-direction: row;
    gap: 7px;
    padding: 0 16px;
    border-radius: 999px;
  }

  .MCM-global-nav-label {
    font-size: 14px;
    font-weight: 600;
  }

  .MCM-global-nav-tab.is-active {
    background: rgba(34, 90, 167, .1);
  }

  .MCM-global-nav-tab svg {
    width: 20px;
    height: 20px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .MCM-global-nav-tab:not(.is-active):hover {
    color: var(--MCM-global-nav-label);
    background: var(--MCM-global-nav-fill);
  }
}

/* Sign In sheet: two rows and Cancel, Inset Grouped */
.MCM-global-nav-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.MCM-global-nav-sheet-layer[hidden] {
  display: none;
}

.MCM-global-nav-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .32);
  animation: MCM-global-nav-fade .2s ease;
}

.MCM-global-nav-sheet {
  position: relative;
  width: min(100%, 440px);
  padding: 8px max(10px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
  animation: MCM-global-nav-rise .32s cubic-bezier(.32, .72, 0, 1);
}

.MCM-global-nav-sheet-header {
  margin: 0 0 8px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  background: var(--MCM-global-nav-surface);
  text-align: center;
}

.MCM-global-nav-sheet-title {
  margin: 0;
  color: var(--MCM-global-nav-label);
  font-size: 17px;
  font-weight: 600;
}

.MCM-global-nav-sheet-subtitle {
  margin: 2px 0 0;
  color: var(--MCM-global-nav-secondary);
  font-size: 13px;
}

.MCM-global-nav-sheet-group {
  overflow: hidden;
  border-radius: 14px;
  background: var(--MCM-global-nav-surface);
}

.MCM-global-nav-sheet-row {
  position: relative;
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--MCM-global-nav-label);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.MCM-global-nav-sheet-row + .MCM-global-nav-sheet-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 58px;
  right: 0;
  height: 1px;
  background: var(--MCM-global-nav-hairline);
  transform: scaleY(.5);
  transform-origin: top;
}

.MCM-global-nav-sheet-row:active {
  background: var(--MCM-global-nav-fill);
}

.MCM-global-nav-sheet-row:focus-visible,
.MCM-global-nav-sheet-cancel:focus-visible {
  outline: 3px solid rgba(34, 90, 167, .3);
  outline-offset: -3px;
}

.MCM-global-nav-sheet-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--MCM-global-nav-tint);
  color: #fff;
}

.MCM-global-nav-sheet-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 1px;
}

.MCM-global-nav-sheet-copy strong {
  font-size: 17px;
  font-weight: 400;
}

.MCM-global-nav-sheet-copy small {
  color: var(--MCM-global-nav-secondary);
  font-size: 13px;
}

.MCM-global-nav-sheet-chevron {
  flex: 0 0 auto;
  color: #c7c7cc;
}

.MCM-global-nav-sheet-cancel {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border: 0;
  border-radius: 14px;
  background: var(--MCM-global-nav-surface);
  color: var(--MCM-global-nav-tint);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

@keyframes MCM-global-nav-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes MCM-global-nav-rise {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .MCM-global-nav,
  .MCM-global-nav-tab { transition: none; }
  .MCM-global-nav-sheet,
  .MCM-global-nav-sheet-backdrop { animation: none; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --MCM-global-nav-bar: rgba(22, 22, 24, 0.92);
    --MCM-global-nav-hairline: rgba(84, 84, 88, 0.65);
    --MCM-global-nav-tint: #7eb0f3;
    --MCM-global-nav-ground: #000000;
    --MCM-global-nav-surface: #1c1c1e;
    --MCM-global-nav-label: #ffffff;
    --MCM-global-nav-secondary: #98989f;
    --MCM-global-nav-fill: rgba(118, 118, 128, 0.24);
  }

  .MCM-global-nav-sheet-icon {
    color: #111827;
  }
}
