/* Basics */
.mapboxgl-ctrl-geocoder,
.mapboxgl-ctrl-geocoder *,
.mapboxgl-ctrl-geocoder *:after,
.mapboxgl-ctrl-geocoder *:before {
  box-sizing: border-box;
}

/* Add styles for the message box */
#message-box {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
#message-content {
  background-color: #eae7e2;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}
#continue-button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #573412;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

.geocoder {
    position: fixed;
    z-index: 2;
    width: 80%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, 0);
    display: none;
    margin: 0 auto;
}

.geocoder.visible {
    display: block;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    display: none;
}

.overlay.visible {
    display: block;
}

.mapboxgl-ctrl-geocoder {
    min-width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .geocoder {
        width: 95%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

.mapboxgl-ctrl-geocoder {
  font-size: 18px;
  line-height: 24px;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, Helvetica, sans-serif;
  position: relative;
  background-color: #eae7e2;
  width: 100%;
  min-width: 240px;
  z-index: 1;
  border-radius: 4px;
  transition: width .25s, min-width .25s;
}

.mapboxgl-ctrl-geocoder--input {
  font: inherit;
  width: 100%;
  border: 0;
  background-color: transparent;
  margin: 0;
  height: 50px;
  color: #404040; /* fallback */
  color: rgba(0, 0, 0, 0.75);
  padding: 6px 45px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.mapboxgl-ctrl-geocoder--input::-ms-clear {
  display: none; /* hide input clear button in IE */
}

.mapboxgl-ctrl-geocoder--input:focus {
  color: #404040; /* fallback */
  color: rgba(0, 0, 0, 0.75);
  outline: 0;
  box-shadow: none;
  outline: thin dotted;
}

.mapboxgl-ctrl-geocoder .mapboxgl-ctrl-geocoder--pin-right > * {
  z-index: 2;
  position: absolute;
  right: 8px;
  top: 7px;
  display: none;
}

.mapboxgl-ctrl-geocoder,
.mapboxgl-ctrl-geocoder .suggestions {
  box-shadow: 0 0 10px 2px rgba(0,0,0,.1);
}

/* Collapsed */
.mapboxgl-ctrl-geocoder.mapboxgl-ctrl-geocoder--collapsed {
  width: 50px;
  min-width: 50px;
  transition: width .25s, min-width .25s;
}

/* Suggestions */
.mapboxgl-ctrl-geocoder .suggestions {
  background-color: #eae7e2;
  border-radius: 4px;
  left: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  width: 100%;
  top: 110%; /* fallback */
  top: calc(100% + 6px);
  z-index: 1000;
  overflow: hidden;
  font-size: 15px;
}

.mapboxgl-ctrl-bottom-left .suggestions,
.mapboxgl-ctrl-bottom-right .suggestions {
  top: auto;
  bottom: 100%;
}

.mapboxgl-ctrl-geocoder .suggestions > li > a {
  cursor: default;
  display: block;
  padding: 6px 12px;
  color: #404040;
}

.mapboxgl-ctrl-geocoder .suggestions > .active > a,
.mapboxgl-ctrl-geocoder .suggestions > li > a:hover {
  color: #404040;
  background-color: #f3f3f3;
  text-decoration: none;
  cursor: pointer;
}

.mapboxgl-ctrl-geocoder--suggestion-title {
  font-weight: bold;
}

.mapboxgl-ctrl-geocoder--suggestion-title,
.mapboxgl-ctrl-geocoder--suggestion-address {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Icons */
.mapboxgl-ctrl-geocoder--icon {
  display: inline-block;
  vertical-align: middle;
  speak: none;
  fill: #757575;
  top: 15px;
}

.mapboxgl-ctrl-geocoder--icon-search {
  position: absolute;
  top: 13px;
  left: 12px;
  width: 23px;
  height: 23px;
}

.mapboxgl-ctrl-geocoder--button {
  padding: 0;
  margin: 0;
  border: none;
  cursor: pointer;
  background: #eae7e2;
  line-height: 1;
}

.mapboxgl-ctrl-geocoder--icon-close {
  width: 20px;
  height: 20px;
  margin-top: 8px;
  margin-right: 3px;
}

.mapboxgl-ctrl-geocoder--button:hover .mapboxgl-ctrl-geocoder--icon-close {
  fill: #909090;
}

.mapboxgl-ctrl-geocoder--icon-geolocate {
  width: 22px;
  height: 22px;
  margin-top: 6px;
  margin-right: 3px;
}

.mapboxgl-ctrl-geocoder--icon-loading {
  width: 26px;
  height: 26px;
  margin-top: 5px;
  margin-right: 0px;
  -moz-animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
  -webkit-animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
  animation: rotate 0.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.mapboxgl-ctrl-geocoder--powered-by {
  display: block;
  float: left;
  padding: 6px 12px;
  padding-bottom: 9px;
  font-size: 13px;
}

.mapboxgl-ctrl-geocoder--powered-by a {
  color: #909090;
}

.mapboxgl-ctrl-geocoder--powered-by a:not(:hover) {
  text-decoration: none;  
}

/* Animation */
@-webkit-keyframes rotate {
  from {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes rotate {
  from {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

/* Media queries*/
@media screen and (min-width: 640px) {

  .mapboxgl-ctrl-geocoder.mapboxgl-ctrl-geocoder--collapsed {
    width: 36px;
    min-width: 36px;
  }

  .mapboxgl-ctrl-geocoder {
    width: 33.3333%;
    font-size: 15px;
    line-height: 20px;
    max-width: 360px;
  }
  .mapboxgl-ctrl-geocoder .suggestions {
    font-size: 13px;
  }

  .mapboxgl-ctrl-geocoder--icon {
    top: 8px;
  }

  .mapboxgl-ctrl-geocoder--icon-close {
    width: 16px;
    height: 16px;
    margin-top: 3px;
    margin-right: 0;
  }

  .mapboxgl-ctrl-geocoder--icon-geolocate {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    margin-right: 0;
  }

  .mapboxgl-ctrl-geocoder--icon-search {
    left: 7px;
    width: 20px;
    height: 20px;
  }

  .mapboxgl-ctrl-geocoder--input {
    height: 36px;
    padding: 6px 35px;
  }

  .mapboxgl-ctrl-geocoder--icon-loading {
    width: 26px;
    height: 26px;
    margin-top: -2px;
    margin-right: -5px;
  }

  .mapbox-gl-geocoder--error{
    color:#909090;
    padding: 6px 12px;
    font-size: 16px;
    text-align: center;
  }

  .mapboxgl-ctrl-geocoder--powered-by {
    font-size: 11px !important;
  }
}

#images {
    position: relative;
    width: 100%;
    height: 60px;
    background-color: #eae7e2;
}

#images .left {
    width: 32px;
    height: 32px;
    margin-left: 3%;
    margin-top: 14px;
    position: absolute;
    left: 0px;
}

#images .right {
    width: 32px;
    height: 32px;
    margin-top: 14px;
    position: absolute;
    right: 20px;
}

#images .pitch {
    width: 32px;
    height: 32px;
    margin-top: 14px;
    position: absolute;
    right: 72px;
}

#images .search {
  width: 40px;
  height: 40px;
  margin-top: 14px;
  position: absolute;
  left: 0px;
}

#map {
    position: absolute;
    top: 60px;
    bottom: 0;
    width: 100%;
}

#search-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #573412;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    max-width: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#crime-rate-dropdown {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

#tour-guide-dropdown {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

.dropdown-button {
    width: 50px;
    height: 50px;
    background-color: #573412;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.dropdown-button:hover {
    transform: scale(1.1);
    background-color: #6b3f15;
}

.dropdown-button .icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-button .icon svg {
    width: 24px;
    height: 24px;
}

.dropdown-content {
    position: fixed;
    bottom: 100px;
    width: 300px;
    background-color: #eae7e2;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-height: 60vh;
    overflow-y: auto;
    padding: 0;
}

#crime-rate-dropdown .dropdown-content {
    left: 20px;
}

#tour-guide-dropdown .dropdown-content {
    right: 20px;
}

.dropdown-content.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 15px;
    background-color: #573412;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dropdown-header span {
    font-size: 16px;
    font-weight: 500;
}

.crime-section {
    margin: 15px;
    padding: 0;
}

.crime-section h3 {
    color: #573412;
    font-size: 16px;
    margin-bottom: 8px;
    padding: 0 15px;
}

.crime-section ul {
    list-style: none;
    padding: 0 15px;
    margin: 0;
}

.crime-section li {
    padding: 8px 0;
    color: #404040;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
}

.crime-section li:last-child {
    border-bottom: none;
}

.guide-section {
    padding: 15px;
}

.guide-profile {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.guide-profile:last-child {
    margin-bottom: 0;
}

.guide-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #573412;
}

.guide-info {
    flex: 1;
}

.guide-info h3 {
    color: #573412;
    font-size: 16px;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.guide-specialty {
    color: #404040;
    font-size: 14px;
    margin: 0 0 5px 0;
    font-style: italic;
}

.guide-contact, .guide-email {
    color: #404040;
    font-size: 13px;
    margin: 2px 0;
}

@media (max-width: 768px) {
    #crime-rate-dropdown {
        bottom: 10px;
        left: 10px;
    }

    #tour-guide-dropdown {
        bottom: 10px;
        right: 10px;
    }

    .dropdown-button {
        width: 45px;
        height: 45px;
    }

    .dropdown-button .icon svg {
        width: 20px;
        height: 20px;
    }

    .dropdown-content {
        width: 90vw;
        max-width: 400px;
        bottom: 90px;
    }

    #crime-rate-dropdown .dropdown-content {
        left: 50%;
        transform: translateX(-50%) translateY(20px);
    }

    #tour-guide-dropdown .dropdown-content {
        left: 50%;
        transform: translateX(-50%) translateY(20px);
    }

    .dropdown-content.active {
        transform: translateX(-50%) translateY(0);
    }

    .guide-profile {
        padding: 8px;
    }

    .guide-photo {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }

    .guide-info h3 {
        font-size: 14px;
    }

    .guide-specialty {
        font-size: 12px;
    }

    .guide-contact, .guide-email {
        font-size: 11px;
    }

    .crime-section h3 {
        font-size: 14px;
    }

    .crime-section li {
        font-size: 12px;
        padding: 4px 0;
    }

    .dropdown-header span:first-child {
        font-size: 18px;
    }

    .dropdown-header .icon svg {
        width: 20px;
        height: 20px;
    }
}

.no-guides {
    text-align: center;
    color: #404040;
    padding: 20px;
    font-style: italic;
}

.no-data {
    text-align: center;
    color: #404040;
    padding: 10px;
    font-style: italic;
    border-bottom: none !important;
}

/* Guide Modal Styles */
.guide-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.guide-modal-content {
    background-color: #eae7e2;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-family: 'Poppins', sans-serif;
}

.modal-header {
    padding: 20px;
    background-color: #573412;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Poppins', sans-serif;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.close-button {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-family: 'Poppins', sans-serif;
}

.modal-body {
    padding: 20px;
    font-family: 'Poppins', sans-serif;
}

.modal-guide-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    display: block;
    border: 3px solid #573412;
}

.modal-guide-info {
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.modal-guide-info h3 {
    color: #573412;
    font-size: 18px;
    margin: 0 0 10px 0;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.modal-guide-contact,
.modal-guide-email {
    color: #404040;
    font-size: 16px;
    margin: 5px 0;
    font-family: 'Poppins', sans-serif;
}

.modal-guide-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-family: 'Poppins', sans-serif;
}

.modal-guide-description p {
    color: #404040;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

@media (max-width: 768px) {
    .guide-modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-guide-photo {
        width: 100px;
        height: 100px;
    }

    .modal-guide-info h3 {
        font-size: 16px;
    }

    .modal-guide-contact,
    .modal-guide-email {
        font-size: 14px;
    }

    .modal-guide-description p {
        font-size: 14px;
    }
}