/* location.css
  Styles for the large checkin map and list
*/

/* import local font files ----------------------------------------------- */

html {
  font-size: 18px;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: hsla(0, 0%, 50%, 1);
  font-size: 1rem;
  font-family: system-ui, Avenir, "Segoe UI", "Lucida Sans Unicode", Verdana, sans-serif;
  font-weight: 200;
}

body.checkin-list {
  background-color: hsla(0, 0%, 100%, 1);
  padding: 3rem 1rem;
}

@media (min-width: 48rem) {
  body.checkin-list {
    padding: 2rem;
  }
}

header {
  position: fixed;
  display: flex;
  flex-direction: row;
  align-items: center;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  border-block-end: 1px solid hsla(0, 0%, 50%, 1);
  background-color: hsla(0, 0%, 95%, 1);
  opacity: 0.9;
  color: hsla(0, 0%, 15%, 1);
  padding: 0.8rem 0;
  margin: 0;
}

.headMain {
  flex: 1 1 auto;
}

.pageTitle { 
  margin: 0;
  padding: 0 0 0 0.8rem;
  font-size: 1.2rem;
}

.pageTitle span {
  font-weight: 200;
}

.current {
  font-size: 0.9rem;
  font-weight: 200;
  padding: 0 0 0 0.8rem;
  margin: 0.25rem 0 0 0;
}

.current .emoji {
  vertical-align: bottom;
}

a:link {
  text-decoration: none;
  color: hsla(0, 0%, 15%, 1);
  transition: color 0.3s ease-in-out;
  font-weight: 700;
}

a:visited {
  color: hsla(0, 0%, 15%, 1);
  font-weight: 700;
}

a:hover {
  text-decoration: underline;
  color: rgba(31, 31, 31, 0.6);
  font-weight: 700;
}

a:focus {
  outline: thin dotted;
  color: hsla(0, 0%, 15%, 1);
  font-weight: 700;
}

a:hover,
a:active {
  outline: 0;
}

#map {
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#layerMenu {
  position: absolute;
  top: 6.5rem;
  right: 0.625rem;
  z-index: 2;
  background-color: #fff;
  border-radius: 5px;
  border: 2px solid #d3d3d3;
  padding: 0.5rem 0.75rem 0.5rem 0.25rem;
  font-size: 0.75rem;
}

@media (min-width: 48rem) {
  #layerMenu {
    top: 5.25rem;
  }
}

#layerMenu input {
  vertical-align: bottom;
  accent-color: #333;
}

#layerMenu label {
  pointer-events: auto;
  cursor: pointer;
}

#layerMenu label {
  display: block;
  margin-block-end: 0.5rem;
}

#layerMenu label:last-child {
  margin-block-end: 0;
}

.leaflet-top {
  top: 5rem;
}

.leaflet-popup-content-wrapper {
  border-radius: 4px;
}

.map-marker {
  background-image: url('/css/leaflet/images/cjio-marker.png');
  background-size: cover;
  width: 25px;
  height: 36px;
}

@media (min-resolution: 192dpi) {
  .map-marker {
    background-image: url('/css/leaflet/images/cjio-marker@2x.png');
  }
}

.checkin-list h1 {
  margin: 0;
}

.checkin-grid {
  width: 100%;
  display: grid;
  gap: 1rem;
  border-block-start: 1px solid #666;
  padding-block-start: 1rem;
}

/* @media (min-width: 36rem) {
  .checkin-grid {
    grid-template-columns: repeat(2, calc(50% - 0.5rem));
  }
} */

@media (min-width: 48rem) {
  .checkin-grid {
    grid-template-columns: repeat(3, calc(33% - 0.666667rem));
  }
}

@media (min-width: 64rem) {
  .checkin-grid {
    grid-template-columns: repeat(4, calc(25% - 0.75rem));
  }
}

.checkin-grid-item {
  margin: 0;
  flex: 1 0 20%;
}

.checkin-address {
  font-size: 0.85rem;
}

.checkin-grid-item time {
  font-size: 0.8rem;
}

.checkin-coords {
  font-size: 0.7rem;
}

@media (prefers-color-scheme: dark) {
  body.checkin-list {
    background-color: #262626;
    color: #f2f2f2;
  }

  header {
    border-block-end: 1px solid #f2f2f2;
    background-color: #404040;
    color: #f2f2f2;
  }

  a:link {
    text-decoration: none;
    color: #f2f2f2;
    transition: color 0.3s ease-in-out;
  }

  a:visited {
    text-decoration: none;
    color: #f2f2f2;
  }

  a:hover {
    text-decoration: none;
    color: #ffb442;
  }

  a:focus {
    outline: thin dotted;
    color: #ffb442;
  }

  a:hover,
  a:active {
    outline: 0;
  }

  .map-marker {
    background-image: url('/css/leaflet/images/cjio-marker-yellow.png');
    background-size: cover;
    width: 25px;
    height: 36px;
  }
  
  @media (min-resolution: 192dpi) {
    .map-marker {
      background-image: url('/css/leaflet/images/cjio-marker-yellow@2x.png');
    }
  }
}