#map-container {
  height: 600px;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.amap-marker-label {
  border: none;
  background-color: transparent;
}

.custom-marker {
  width: 50px;
  height: 50px;
  position: relative;
}

.marker-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  background-color: #fff;
}

.marker-pin {
  width: 0;
  height: 0;
  position: absolute;
  bottom: 0;
  left: 15px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 10px solid var(--primary-color);
}

.place-info-window {
  width: 250px;
  padding: 10px;
}

.place-info-window h5 {
  margin-top: 0;
  margin-bottom: 8px;
}

.place-info-window img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.view-details-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}

.action-buttons {
  margin-bottom: 20px;
}

.map-view-btn {
  border-radius: 20px;
  padding: 8px 15px;
  margin-right: 10px;
}

.feature-icon-available {
  color: var(--primary-color);
}

.feature-icon-unavailable {
  color: var(--secondary-color, #6c757d);
}

/* Location detection indicator styles */
#location-detecting {
  font-size: 0.75rem;
  vertical-align: middle;
  animation: pulse 1.5s infinite;
}

#location-detected {
  font-size: 0.75rem;
  vertical-align: middle;
  animation: fadeIn 0.5s;
}

@keyframes pulse {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Make the location arrow spin */
.fa-location-arrow.fa-spin {
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Override Bootstrap's text-primary with our primary color */
.text-primary {
  color: var(--primary-color) !important;
}

/* Override Bootstrap's btn-outline-primary */
.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Custom styles for select elements to match theme */
.form-select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.25rem rgba(138, 43, 226, 0.25);
}

/* Enhanced styles for filter selects */
.filter-select {
  padding: 8px 35px 8px 15px;
  border-radius: 25px;
  border: 2px solid var(--secondary-color);
  background-color: white;
  color: var(--text-color);
  font-weight: 500;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%238a2be2' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 140px;
}

.filter-select:hover {
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(138, 43, 226, 0.15);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.2);
}

/* Animation for select options */
@keyframes selectFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Style for select options in supported browsers */
.filter-select option {
  padding: 10px;
  background-color: white;
}

/* Responsive styles */
@media (max-width: 767px) {
  /* Make the main content container full height on mobile for map view */
  body.map-view .main-content {
    padding-bottom: 0;
    height: calc(
      100vh - 140px
    ); /* Subtract navbar (~70px) and footer (~70px) height */
    display: flex;
    flex-direction: column;
    padding-top: 0.5rem; /* Reduce top padding */
  }

  /* Make the map row expand to fill available space */
  body.map-view .main-content .row:last-child {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 0; /* Remove bottom margin */
  }

  /* Make the map column expand to fill available space */
  body.map-view .main-content .row:last-child .col-12 {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  #map-container {
    height: 100% !important; /* Override the 400px height */
    min-height: 250px; /* Ensure minimum usable height */
    flex: 1;
    margin-bottom: 0; /* Remove bottom margin on mobile */
    border-radius: 8px; /* Slightly smaller border radius for mobile */
  }

  /* Reduce spacing for mobile to maximize map space */
  .main-content {
    padding-top: 0.5rem;
  }

  /* Make filter card more compact on mobile */
  .filter-card .card-body {
    padding: 0.5rem;
  }

  /* Reduce margins between sections */
  .row.mb-4 {
    margin-bottom: 0.75rem !important;
  }

  .action-buttons {
    flex-direction: column;
    align-items: stretch !important;
  }

  .action-buttons > div {
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
  }

  .map-view-btn {
    padding: 6px 12px;
    font-size: 14px;
    margin-bottom: 8px;
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .filter-select {
    padding: 6px 30px 6px 12px;
    margin-bottom: 8px;
    width: 100%;
    min-width: unset;
  }

  .place-info-window {
    width: 200px;
  }

  .place-info-window img {
    height: 100px;
  }

  /* Hide the title section on mobile to save space */
  .d-none.d-md-block {
    display: none !important;
  }

  /* Ensure the container takes full width on mobile */
  body.map-view .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    max-width: 100%;
  }
}

/* Additional responsive styles for landscape mobile or very small heights */
@media (max-width: 767px) and (max-height: 500px) {
  body.map-view .main-content {
    height: calc(
      100vh - 100px
    ); /* Reduce navbar/footer calculation for small heights */
  }

  #map-container {
    min-height: 200px; /* Smaller minimum height for landscape */
  }

  /* Make filter section even more compact */
  .filter-card .card-body {
    padding: 0.25rem;
  }

  .row.mb-4 {
    margin-bottom: 0.5rem !important;
  }

  /* Smaller form elements */
  .filter-select {
    padding: 4px 25px 4px 8px;
    font-size: 0.875rem;
  }
}

/* Remove duplicate styles as they're now in components.css */

.no-markers-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* User location marker styles */
.user-location-marker {
  width: 20px;
  height: 20px;
  position: relative;
}

.user-location-dot {
  width: 20px;
  height: 20px;
  background-color: #007bff;
  border: 3px solid #ffffff;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
  z-index: 2;
}

.user-location-pulse {
  position: absolute;
  top: -10px;
  left: -10px;
  width: 40px;
  height: 40px;
  border: 2px solid #007bff;
  border-radius: 50%;
  background-color: rgba(0, 123, 255, 0.1);
  animation: userLocationPulse 2s infinite;
  z-index: 1;
}

@keyframes userLocationPulse {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

/* User location info window styles */
.user-location-info {
  padding: 8px;
  min-width: 120px;
  text-align: center;
}

.user-location-info h6 {
  margin: 0 0 5px 0;
  color: #007bff;
  font-size: 14px;
  font-weight: 600;
}

.user-location-info p {
  margin: 0;
  font-size: 12px;
  color: #666;
}
