/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

html {
  height: 100%;
}

.route-editor-marker {
  align-items: center;
  background: #ff3dbc;
  border: 2px solid #050505;
  border-radius: 999px;
  box-shadow: 0 2px 0 #050505, 0 8px 18px rgba(255, 61, 188, 0.34);
  color: #000;
  cursor: grab;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 26px;
  justify-content: center;
  line-height: 1;
  width: 26px;
}

.route-editor-marker:active {
  cursor: grabbing;
  transform: translateY(1px);
}

.route-editor-marker-leaflet {
  background: transparent;
  border: 0;
}

body[data-mobile-route-editor="true"] {
  --route-editor-viewport-height: 100vh;
  background: #000;
  height: var(--route-editor-viewport-height);
  margin: 0;
  min-height: var(--route-editor-viewport-height);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: auto;
}

body.app-shell-body[data-mobile-route-editor="true"]::before,
body.app-shell-body[data-mobile-route-editor="true"]::after {
  content: none;
  display: none;
}

.mobile-route-editor {
  background: #000;
  color: #f4f4f4;
  height: var(--route-editor-viewport-height, 100vh);
  min-height: var(--route-editor-viewport-height, 100vh);
  overflow: hidden;
  position: relative;
  width: 100vw;
  z-index: 1;
}

@supports (height: 100dvh) {
  body[data-mobile-route-editor="true"] {
    --route-editor-viewport-height: 100dvh;
  }
}

body[data-mobile-route-editor="true"] .mobile-route-editor,
body[data-mobile-route-editor="true"] .mobile-route-editor__map,
body[data-mobile-route-editor="true"] .mobile-route-editor__map.mapboxgl-map {
  height: var(--route-editor-viewport-height, 100vh);
  min-height: var(--route-editor-viewport-height, 100vh);
}

body[data-mobile-route-editor="true"] .mobile-route-editor__map,
body[data-mobile-route-editor="true"] .mobile-route-editor__map.mapboxgl-map {
  background: #f4f4f4;
  inset: 0;
  position: absolute;
  width: 100%;
  z-index: 0;
}

body[data-mobile-route-editor="true"] .mobile-route-editor__map .mapboxgl-canvas-container,
body[data-mobile-route-editor="true"] .mobile-route-editor__map .mapboxgl-canvas {
  min-height: var(--route-editor-viewport-height, 100vh);
}

body[data-mobile-route-editor="true"] .mobile-route-editor__map--leaflet {
  touch-action: pan-x pan-y pinch-zoom;
}

.mobile-route-editor__status {
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(244, 244, 244, 0.14);
  border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  left: max(14px, env(safe-area-inset-left, 0px));
  max-width: calc(100vw - 28px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  min-height: 100px;
  padding: 14px 16px;
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 1200;
}

.mobile-route-editor__distance {
  color: #f4f4f4;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  margin: 0;
  min-height: 28px;
}

.mobile-route-editor__message {
  color: rgba(244, 244, 244, 0.68);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  margin: 7px 0 0;
  min-height: 17px;
}

.mobile-route-editor__hint {
  color: #00e9ff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  margin: 8px 0 0;
  min-height: 15px;
}

.mobile-route-editor__saved {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(173, 255, 0, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  color: #000;
  font-size: 13px;
  font-weight: 950;
  left: max(14px, env(safe-area-inset-left, 0px));
  min-height: 38px;
  padding: 10px 18px;
  position: fixed;
  top: calc(124px + env(safe-area-inset-top, 0px));
  z-index: 1200;
}

.mobile-route-editor__history {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(244, 244, 244, 0.16);
  border-radius: 999px;
  bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  gap: 1px;
  left: max(14px, env(safe-area-inset-left, 0px));
  overflow: hidden;
  position: fixed;
  z-index: 1200;
}

.mobile-route-editor__history-button {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(244, 244, 244, 0.86);
  font-size: 13px;
  font-weight: 900;
  min-height: 42px;
  min-width: 68px;
  padding: 0 14px;
}

.mobile-route-editor__history-button + .mobile-route-editor__history-button {
  border-left: 1px solid rgba(244, 244, 244, 0.16);
}

.mobile-route-editor__history-button:disabled {
  color: rgba(244, 244, 244, 0.32);
}

.mobile-route-editor__clear {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(244, 244, 244, 0.16);
  border-radius: 999px;
  bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  color: rgba(244, 244, 244, 0.86);
  font-size: 13px;
  font-weight: 900;
  min-height: 42px;
  padding: 0 18px;
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 1200;
}

.mobile-route-editor__clear:disabled {
  opacity: 0;
  pointer-events: none;
}

.mobile-route-editor__actions {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0));
  bottom: 0;
  left: 0;
  padding: 30px max(14px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  position: fixed;
  right: 0;
  z-index: 1300;
}

.mobile-route-editor__save {
  appearance: none;
  background: #00e9ff;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 233, 255, 0.28);
  color: #000;
  display: block;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0;
  min-height: 56px;
  text-align: center;
  width: 100%;
}

.mobile-route-editor__errors {
  background: rgba(255, 61, 188, 0.14);
  border: 1px solid rgba(255, 61, 188, 0.36);
  border-radius: 18px;
  color: #ff3dbc;
  font-size: 13px;
  font-weight: 800;
  left: max(14px, env(safe-area-inset-left, 0px));
  padding: 12px 14px;
  position: fixed;
  right: max(14px, env(safe-area-inset-right, 0px));
  top: calc(100px + env(safe-area-inset-top, 0px));
  z-index: 1400;
}

.mobile-route-editor__errors p {
  margin: 0 0 6px;
}

.mobile-route-editor__errors ul {
  margin: 0;
  padding-left: 18px;
}

.mobile-route-editor__fallback {
  align-items: center;
  background: #000;
  color: rgba(244, 244, 244, 0.72);
  display: flex;
  font-size: 15px;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
