/* Desktop and larger screens */
html {
	box-sizing: border-box;
}
*, *:before, *:after {
	box-sizing: inherit;
}
html, body {
	padding: 0;
	margin: 0;
}
body {
	background: url('../image/backgrounds/paw_print_trail_smaller.png');
}
.logo {
	position:absolute; top:0; left:10px; padding:8px 0;z-index:500;
}
.logo img {width:52px;}
#map {
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
/*	display:none;*/
}

#map-center-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  margin-top: -9px;
  pointer-events: none;
  z-index: 1000;
  font-size: 16px;
  color: #f44336;
  text-shadow: 0 0 2px white;
}

#debug-info {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    padding: 0px;
    box-sizing: border-box;
}

#debug-info h1 {
    margin: 0px 0 10px 0;
    border-bottom: 1px solid #000;
}

.bottom-buttons {
	margin-top: auto;
	padding: 0;
	border-top: 1px solid #ccc;
}

#search-results-message {padding: 10px;}

#contacts-icon {
  display: none;
}

#route-list {
    overflow-y: auto;
    margin-top: 0px;
	/*max-height: 80vh;*/
	  display: flex;
	  flex-wrap: wrap;
	  gap: 5px; /* or some gap between badges */
}

#route-list table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    margin-top: 0px;
}

#route-list thead {
    background: #e5e5e5;
}

#route-list th,
#route-list td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #e8e8e8;
	white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#route-list td {
  white-space: nowrap;
}

#route-list th.distancecol { width: 25%; }  /* Distance */
#route-list th.timecol { width: 25%; }  /* Time */
#route-list th.ratingcol { width: 50%; }  /* Rating */

#route-list tr.detail-row td {
	background: #f9f9f9;
	border-top: none;
	border-bottom: 1px solid #ddd;
	font-size: 13px;
	padding: 8px 10px;
}

.invite-options p {white-space: wrap}

#chat-search[data-view="search"] {
	display: flex;
	flex-direction: column;
	height: 100%; /* take full height */
	max-height: 70vh; /* if you want to keep it bounded */
	overflow: hidden; /* prevent double scrollbars */
}

.tile-label {
	pointer-events: none;
	z-index: 999;
	display: none;
}

.poi-type-list {
    overflow-y: auto;
    padding: 10px;
    display: block; /* no flex layout */
    line-height: 0;  /* remove weird whitespace gaps */
}

.poi-type-list .poi-type {
    display: inline-block;
    margin: 4px;
    background: #f1f1f1;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    height: 28px;
    line-height: normal;
}

.poi-type-list .poi-type.active {
	background-color: #007acc!important;
	color: white;
	font-weight: bold;
}
.poi-type-list .poi-type:hover {
	background: #ddd;
}

.modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    width: 340px;
}

.modal img {
    width: 340px;
    height: auto;
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-close-button:hover {
    color: #333;
}

.tooltip {
    max-width: 160px;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    position: absolute;
    z-index: 10000;
    top: 80px;
}

.tooltip a {
    color: blue;
}

.tooltip img {
    width: 100%;
    height: auto;
    display: block;
}

.tooltip-close {
    position: absolute;
    top: 0px;
    right: 0px;
    font-size: 24px;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.tooltip-close:hover {
    color: #000;
}

.leaflet-control-attribution.leaflet-control {
    display: none;
}

.leaflet-control-zoom {
  bottom: 80px;
  right: 10px;
  z-index: 1001; /* ensure it stays above tiles but below modals/tooltips */
}

/* Sidebar Award Previews */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.route-type-label { margin:4px 0; }

.image-wrapper {
    position: relative;
    display: inline-block;
	width: 24%;
    box-sizing: border-box;
}

.image-wrapper .award {
	filter: grayscale(100%);
	width:100%;
	border: 1px solid #ccc;
}
.image-wrapper .padlock-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; /* Adjust size as needed */
    opacity: 0.9;
}

.invite-dog-btn {
  display: inline-block;
  margin:8px 0;
  background-color: #f5c572;
  color: white;
  padding: 10px 20px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border: 1px solid #000;
  border-radius: 0px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
  transform-origin: center bottom;
  width:100%;
  font-size:110%;
}

.invite-dog-btn:hover {
  background-color: #c68b40;
}

#loggedout-div {padding:20px;text-align:center;}
#loggedout-div img {width:60px;height:60px;border-radius:50%;margin-bottom:10px;}
#loggedout-div p {font-size:16px;line-height:1.4;}

.rating_col {
  text-align: center;
  white-space: nowrap;
}

.star-rating {
  font-size: 12px;
  line-height: 1;
}

.no-rating {
  color: #777;
  font-size: 13px;
}


.badge.unread-badge {
  background-color: #3ccf4e;
  color: white;
  font-size: 12px;
  font-weight: bold;
  border-radius: 999px;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
  float:right;
}

  .leaflet-marker-icon.bounce {
    animation: drop-bounce 0.6s ease-out;
  }

  @keyframes drop-bounce {
    0% {
      transform: translateY(-500px);
      opacity: 0;
    }
    80% {
      transform: translateY(20px);
      opacity: 1;
    }
    100% {
      transform: translateY(0);
    }
  }

.system-message {
  text-align: center;
  font-style: italic;
  opacity: 0.7;
  margin: 10px 0;
}

.qr-img {
  margin-top: 5px;
  max-width: 200px;
  width:100%;
  border: 1px solid #ccc;
  border-radius: 10px;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.login-buttons button {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  font-family: 'Arial', sans-serif;
}

.login-buttons .register-btn {
  background-color: #0b7d51;
  color: white;
}

.login-buttons .register-btn:hover {
  background-color: #0a6b46;
}

.login-buttons .login-btn {
  background-color: #eee;
  color: #333;
  border: 1px solid #ccc;
}

.login-buttons .login-btn:hover {
  background-color: #ddd;
}

.map-region-card {
  position:absolute;
  top:20px;
  left:20px;
  z-index:600;
  max-width:350px;
  font-family:inherit;
}

.map-region-card .content {
  max-height: 200px;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.25s ease;
  opacity: 1;
  background: #fff;
  padding: 0px 10px 10px;
  -webkit-border-bottom-right-radius: 5px;
  -webkit-border-bottom-left-radius: 5px;
  -moz-border-radius-bottomright: 5px;
  -moz-border-radius-bottomleft: 5px;
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
}

.map-region-card .content.collapsed {
  max-height: 0;
  opacity: 0;
}

.map-region-card .mrc-header {
  display: flex;
  align-items: left;
  line-height:11px;
}

.map-region-card .toggle {
  cursor: pointer;
  font-size: 20px;
  line-height: 12px;
}

.map-region-card .inner {
  padding:17px 16px 0 50px;
  position:relative;
}

.map-region-card .close {
  position:absolute;
  top:6px;
  right:10px;
  cursor:pointer;
  font-size:18px;
}

.map-region-card .breadcrumbs {
  font-size:12px;
  margin-bottom:8px;
  color:#666;
}

.map-region-card .breadcrumbs a {
  color:#0077cc;
  text-decoration:none;
}

.map-region-card .breadcrumbs a:hover {
  text-decoration:underline;
}

.map-region-card .title {
  font-weight:bold;
  margin-bottom:6px;
}

.map-region-card .progress {
  height:8px;
  background:#eee;
  border-radius:6px;
  overflow:hidden;
  margin:8px 0;
}

.map-region-card .bar {
  height:100%;
  background:#4CAF50;
  width:0%;
}

.map-region-card .text {
  font-size:13px;
}



	#poi-search-container {
	  position: sticky;
	  top: 0;
	  z-index: 10;
	  background: white;
	  padding: 10px;
	  border-bottom: 1px solid #ddd;
	}

	#poi-search {
	  width: 100%;
	  padding: 10px 40px 10px 12px;
	  border: 1px solid #ccc;
	  border-radius: 4px;
	  font-size: 15px;
	  box-sizing: border-box;
	}

	#poi-search-container .search-icon {
	  position: absolute;
	  right: 12px;
	  top: 50%;
	  transform: translateY(-50%);
	  pointer-events: none;
	  font-size: 16px;
	}

	#poi-suggestions {
	  list-style: none;
	  padding: 0;
	  margin: 0;
	  background: #fff;
	  border: 0;
	  border-top: none;
	  max-height: 150px;
	  overflow-y: auto;
	  position: absolute;
	  width: 100%;
	  z-index: 9999;
	  cursor: pointer;

	}

	#poi-suggestions li {
	  display: flex;
	  align-items: center;
	  padding: 8px 12px;
	  cursor: pointer;
	  gap: 8px;
	}

	#poi-suggestions li img {
	  flex-shrink: 0;
	}

	#poi-suggestions li:hover {
	  background-color: #eee;
	}

/* Champions */
    .tab-wrapper {
      display: flex;
      justify-content: center;
      gap: 4px;
      flex-wrap: wrap;
    }
    .tab, .region-tab {
      padding: 8px 16px;
      border: 1px solid #ccc;
      border-radius: 6px 6px 0 0;
      background: #eee;
      cursor: pointer;
    }
    .tab.active, .region-tab.active {
      background: #fff;
      font-weight: bold;
    }
    .champion-header {
      text-align: center;
      font-size: 18px;
      margin: 20px 0 10px;
      color: #333;
    }

    /* 3-column responsive layout */
    .champion-columns {
      display: grid;
      grid-template-columns: 1fr;
      gap: 20px;
    }

    @media (min-width: 768px) {
      .champion-columns {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
      }
      .champion-column:not(:last-child) {
        border-right: 1px solid #ddd;
      }
    }

    .champion-column {
      padding: 15px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
    }

    .column-title {
      text-align: center;
      font-size: 18px;
      font-weight: bold;
      color: #444;
      margin-bottom: 15px;
    }

    .champion-card {
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 12px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      padding: 10px;
      text-align: center;
      position: relative;
      margin-bottom: 15px;
    }

    /* wrapper ensures the belt sits relative to the image */
    .photo-wrapper {
      position: relative;
      display: inline-block;
      width: 100%;
    }

    .champion-photo {
      width: 100%;
      height: auto;
      border-radius: 10px;
      object-fit: contain; /* no cropping */
      display: block;
    }

    .belt-overlay {
      position: absolute;
      bottom: 0;
      left: 50%;
      transform: translate(-50%, 50%); /* half over image, half below */
      width: 100px;
      pointer-events: none;
      z-index: 10;
    }

    .champion-info {
      position: relative;
      z-index: 3;
      background: #fff;
      padding-top: 10px; /* space below belt */
      margin-top: 30px;
    }

    .champion-dog {
      font-size: 18px;
      font-weight: bold;
      margin-top: 8px;
    }

	.champion-dog a {
	  color: #000;
	  text-decoration: none;
	}

	.champion-dog a:hover {
	  text-decoration: underline;
	}

    .champion-metric {
      font-size: 15px;
      margin-top: 4px;
      color: #666;
    }

    .loading {
      width: 100%;
      text-align: center;
      font-size: 18px;
      padding: 40px 0;
      color: #888;
    }


/* Mobile layout */
@media (max-width: 768px) {
  #map {
    width: 100%;
    height: 100vh;
  }

  h1 {
    font-size: 18px;
  }

  select {
    width: 100%;
    margin-bottom: 10px;
  }

}

/* Mobile layout */
@media (max-width: 768px) {
  .logo {
	left:10px;
  }
  .logo img {
    width: 52px;
  }
}
