/**
 * @file
 * CSS for dependent filters functionality.
 */

/* Hide the submit button in propertypage exposed forms since we're auto-submitting */
form[id*="views-exposed-form-propertypage"] input[type="submit"].form-submit:not([name="reset"]) {
  display: none !important;
}

/* Hide reset button by default, show only when filters are active */
form[id*="views-exposed-form-propertypage"] input[type="submit"][name="reset"] {
  display: none;
}

form[id*="views-exposed-form-propertypage"].has-active-filters input[type="submit"][name="reset"] {
  display: inline-block;
}

/* Loading overlay for filter forms */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(196, 0, 75, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-radius: 4px;
}

.loading-spinner {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 25px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}


/* Styles for dynamic map empty results message */
.no-results-message {
  padding: 20px;
  text-align: center;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  margin: 20px 0;
  transition: opacity 0.3s ease-in-out;
}

.no-results-message.dynamic-map-empty {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.no-results-message p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

/* Ensure the message is visible in view content */
.view-content .no-results-message {
  width: 100%;
  box-sizing: border-box;
}

/* Style for Drupal's default view-empty message */
.view-id-propertypage .view-empty {
  padding: 20px;
  text-align: center;
  /* background: #f8f9fa; */
  /* border: 1px solid #e9ecef; */
  /* border-radius: 4px; */
  margin: 20px 0;
  font-size: 16px;
  font-weight: 500;
  /* color: #6c757d; */
  text-align: left;
  min-height: 736px;
}

/* Hide/show page_1 view with smooth transition */
.view-id-propertypage.view-display-id-page_1 {
  transition: opacity 0.3s ease-in-out, height 0.3s ease-in-out;
}

.view-id-propertypage.view-display-id-page_1[style*="display: none"] {
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Hide the location boundary fieldset by default */
.location-boundary-fieldset {
  display: none !important;
}

/* Ensure coordinate container is also hidden */
.coordinate-container {
  display: none !important;
}

/* Style for the coordinate fields when they need to be visible for debugging */
.coordinate-container.debug-visible {
  display: block !important;
  background: #f0f0f0;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.coordinate-container.debug-visible .form-item {
  margin-bottom: 10px;
}

.coordinate-container.debug-visible label {
  font-weight: bold;
  color: #333;
}

.coordinate-container.debug-visible input {
  font-family: monospace;
  font-size: 12px;
  background: #fff;
}
