

* {
  font-family: var(--sl-font-sans);
  --sl-z-index-toast: 999999;
}

body, html {
  width: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#app-loader {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  background-color: rgba(255,255,255,1);
  align-items: center;
  justify-content: center;
  z-index: 9999999999;
}

#split-panel {
  position: relative;
  width: 100%;
  height: 100%;
}

#map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
}

.sl-toast-stack {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

#sidepanel {
  /* overflow-y: none; */
  overflow-y: auto;
}

#sidepanel-header {
  /* display: flex; */
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.5rem 1rem;
}

#current-coordinates {
  flex-grow: 1;
}

#current-coordinates::part(base) {
  justify-content: center;
}

#current-coordinates span {
  opacity: 0.8;
}

#current-coordinates[data-wallid]:not([data-wallid=""]) span {
  opacity: 1 !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#crosshairs {
  z-index: 1001;
  position: absolute;
  pointer-events: none;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#sidepanel-layers {
  display: none;
}

#top-bar {
  height: 50px;
  width: 100%;
  background-color: white;
  display: none;
  gap: 0.5rem;
  padding: 0.25rem;
  box-sizing: border-box;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 99999;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 -1px 0px rgba(0,0,0,0.02);
}

#top-bar.show {
  display: flex;
}

#search {
  width: 100%;
}

#walls-list table {
  width: 100%;
  font-size: 11px;
  color: #333;
  border-collapse: collapse;
}

#walls-list table th {
  font-weight: 400;
  text-transform: uppercase;
  font-size: 10px;
  text-align: left;
  background-color: #eee;
  padding: 0.25rem;
}

#walls-list table td {
  padding: 0.5rem 0.25rem;
  opacity: 0.8;
  border-bottom: 1px solid lightgray;
}

/* #walls-list table tr[data-routes="true"] td:nth-of-type(1) {
  color: var(--sl-color-primary-500);
  font-weight: bold;
} */

#walls-list table td:nth-of-type(1) {
  opacity: 1;
}

.sidepanel-details-header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  position: sticky;
  top: 0;
  background-color: white;
  border-bottom: 1px solid #eee;
  padding: 0 1rem;
  padding-bottom: 0;
  padding-right: 0.5rem;
  z-index: 1;
}

#sidepanel-details-header-wrapper-mobile {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

#walls-list {
  padding: 0.5rem 1rem;
}

#sidepanel-wall-details {
  display: none;
}

#sidepanel-wall-details-content {
  padding: 0.5rem 1rem;
  font-size: 12px;
}

.wall-text-item-wrapper {
  opacity: 0.8;
  margin-top: 1rem;
}

.subheader {
  text-transform: uppercase;
  font-weight: 600;
}

.zoombox-box {
  z-index: 9999;
}

.zoombox-play {
  display: none !important;
}

.wall-tooltip {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 -1px 0px rgba(0,0,0,0.02);
  font-family:  var(--sl-font-sans);
  text-transform: uppercase;
  font-weight: 700;
  padding: 0px 4px;
  background-color: transparent;
  background-color: #ffffff;
  font-size: 10px;
}

sl-popup[hascontent] .autocomplete-content-box {
  border: solid var(--sl-panel-border-width) var(--sl-panel-border-color);
}

.autocomplete-content-box {
  display: block;
  position: relative;
  background: var(--sl-panel-background-color);
  border-radius: var(--sl-border-radius-medium);
  overflow: auto;
  overscroll-behavior: none;
  box-shadow: var(--sl-shadow-large);
  max-height: 300px;
  z-index: 9999;
}

.autocomplete-menu-item {
  position: relative;
  display: flex;
  align-items: stretch;
  font-family: var(--sl-font-sans);
  font-size: var(--sl-font-size-small);
  font-weight: var(--sl-font-weight-normal);
  line-height: var(--sl-line-height-normal);
  letter-spacing: var(--sl-letter-spacing-normal);
  color: var(--sl-color-neutral-700);
  padding: var(--sl-spacing-2x-small) var(--sl-spacing-2x-small);
  transition: var(--sl-transition-fast) fill;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
  cursor: pointer;
}

.autocomplete-menu-item:hover {
  background-color: #f5f6f8;
}

.leaflet-control-attribution {
  display: none !important;
}

#menu-button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 -1px 0px rgba(0,0,0,0.02);
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

#menu-button sl-icon-button {
  color: black;
}

#menu-button sl-menu-item::part(base) {
  font-size: 14px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

#menu-button sl-menu-item::part(checked-icon) {
  display: none;
}
#menu-button sl-menu-item::part(submenu-icon) {
  display: none;
}

sl-drawer::part(base) {
  z-index: 99999;
}

#legend-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  gap: 1rem;
  align-items: center;
}


.legend-icon.walls {
  width: 30px;
  height: 20px;
  background-color:rgba(255,165,0,0.2);
  color:rgba(255,165,0,0.8);
  border:1px solid;
}

.legend-icon.roads {
  width: 30px;
  height: 12px;
  display: flex;
  align-items: center;
  position: relative;
}

.legend-icon.roads .roads-inner {
  height: 8px;
  z-index: 2;
  background-color: white;
  width: 100%;
  position: absolute;
}
.legend-icon.roads .roads-outer {
  height: 12px;
  z-index: 2;
  background-color: black;
  width: 100%;
  position: absolute;
}

.legend-icon.streams {
  width: 30px;
  height: 8px;
  background-color: #90daee;
}

.legend-icon.trails {
  width: 30px;
}

.legend-icon.parking {
  display: flex;
  width: 30px;
  justify-content: center; 
  font-size: 1.5em;
}

.legend-icon.trails.existing {
  height: 4px;
  background-color: black;
}

.legend-icon.trails.unbuilt {
  height: 2px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    90deg,
    black,
    black 6px,
    transparent 4px,
    transparent 10px
  )
}
.legend-icon.trails.recce {
  height: 1px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    90deg,
    black,
    black 2px,
    transparent 2px,
    transparent 4px
  )
}

.legend-item-group-header {
  font-weight: 600
}

.parking-map-icon {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 -1px 0px rgba(0,0,0,0.02);
  background-color: white;
  border-radius: 4px;
}

.route-entry {
  padding: 0.5rem;
  border-bottom: 1px solid var(--sl-color-neutral-300)
}

#search-wrapper-desktop {
  display: none;
  width: 100%;
}


.fade {
  transition: opacity 0.5s ease-out;
}
.fade-out {
  opacity: 0;
}

.drawer-footer-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-feedback {
  display: none;
  position: relative;
  
}

.form-feedback .error {
  color: #842029;
  background-color: #f8d7da;
  border-color: #f5c2c7;
  padding: 1rem 1rem;
  margin-top: 1rem;
  border: 1px solid transparent;
  border-radius: .25rem;
}
.form-feedback .success {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #badbcc;
  padding: 1rem 1rem;
  margin-top: 1rem;
  border: 1px solid transparent;
  border-radius: .25rem;
}

#offline-use-progress-wrapper {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}

#offline-status-table {
  table-layout: fixed;
  width: 100%;
  border: 1px solid #eee;
  margin: 0.5rem 0;
  border-collapse: collapse;
}

#offline-status-table th {
  font-weight: normal;
  text-transform: uppercase;
  background-color: #eee;
  padding: 0.25rem;
  text-align: left;
  color: #464646;
  font-size: 12px;
}

#offline-status-table td {
  padding: 0.25rem;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #202020;
}

#offline-status-table td > div {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

#offline-download-progress::part(base) {
  z-index: 99999;
}

#main-menu-user-header {
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
}

#main-menu-user-header > span {
  font-weight: bold;
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
}

#offline-status-table td.offline-layer-last-update {
  font-size: 12px;
}

.comments-badge::part(base) {
  font-size: 10px;
}

#route-comments-add-comment-wrapper {
  display: none;
  position: absolute;
  background-color: white;
  width: calc(100% - 2rem);
  height: calc(100% - 88px);
  box-sizing: border-box;
  z-index: 1001;
}

#route-comments-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.route-comment, .ticked-route-item {
  padding: 0.5rem;
  background-color: #f3f3f3;
  border-radius: 4px;
  font-size: 14px;
  border-top: 1px solid white;
}

.comment-author {
  font-weight: 600;
}

.route-comment-content {
  opacity: 0.8;
  font-style: italic;
  line-height: 16px;
}

.all-grade-suggestions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.grade-suggestion-wrapper {
  padding: 0.5rem;
  background-color: #f3f3f3;
  border-radius: 4px;
  font-size: 14px;
}

#add-grade-suggestion-section {
  display: none;
  position: absolute;
  background-color: white;
  width: calc(100% - 2rem);
  height: calc(100% - 88px);
  box-sizing: border-box;
  z-index: 1001;
}

.grade-suggestion-name {
  font-weight: 600;
}

.grade-suggestion-comment {
  opacity: 0.8;
  font-style: italic;
  line-height: 16px;
}

sl-badge {
  z-index: 1001;
}

#my-ticklist-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.route-comment-action-buttons sl-button::part(base) {
  min-height: unset;
}

.route-comment-action-buttons sl-button:first-of-type::part(label) {
  padding-right: 0;
}

.route-comment-action-buttons sl-button::part(label) {
  line-height: 16px;
  height: 16px;
}

.route-comment-action-buttons sl-button[data-action="report-comment"] {
  display: none;
}

.route-comment-title-line {
  position: relative;
  display:flex;
  gap:0.5rem; 
  justify-content:space-between;
  margin-bottom:0.5rem;
}

.route-comment[data-depth] .route-comment-title-line::before {
  content: '↵';
  transform: rotate(90deg);
  position: absolute;
  left: -16px;
  top: -10px;
  font-size: 2em;
  opacity: 0.6;
}

sl-menu-item sl-badge::part(base) {
  font-size: 10px;
  line-height: 9px;
}

#activity-wrapper {
  display: none;
  min-height: calc(100% - 58px);
}

#activity-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

#activity-wrapper-toolbar {
  margin-bottom: 0.25rem;
  display: flex;
  gap: 0.25rem;
  position: sticky;
  top: 0;
  background-color: white;
  padding: 0.25rem 0;
  z-index: 2;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

#activity-wrapper-toolbar sl-button::part(base) {
  font-size: 11px;
  border-style: dotted;
}

.activity-item-header {
  display: flex;
  gap: 0.25rem;
  justify-content: space-between;
  align-items: flex-end;
}

.activity-item {
  padding: 0.5rem;
  background-color: #f3f3f3;
  border-radius: 4px;
  font-size: 14px;
  border-top: 1px solid white;
}

#activity-drawer::part(body) {
  padding-top: 0;
  padding-bottom: 0;
}

#activity-paging-wrapper {
  display: flex;
  font-size: 14px;
  opacity: 0.8;
  gap: 0.25rem;
}

#activity-footer {
  display: flex;
  justify-content: space-between;
  position: sticky;
  left: 0;
  bottom: 0;
  background-color: white;
  padding: 0.5rem 0;
  padding-bottom: 1rem;
  align-items: center;
}

.activity-container:first-of-type {
  margin-bottom: 0.5rem;
}

.activity-container-title {
  color: var(--sl-color-primary-600)
}

@media only screen and (min-width: 600px) {
  #crosshairs {
    display: none;
  }

  #walls-table tbody tr {
    cursor: pointer;
  }

  #walls-table tbody tr:hover {
    background-color: var(--sl-color-primary-50);
  }

  #search-wrapper-desktop {
    display: block;
    padding-bottom: 0.5rem;
  }

  .autocomplete-content-box {
    max-height: 500px;
  }

  .close-details-btn {
    display: none;
  }

  #sidepanel-details-header-wrapper-mobile {
    display: none;
  }

  .sidepanel-details-header {
    padding: 0.5rem 1rem;
    padding-bottom: 0;
    padding-right: 0.5rem;
  }


}