/* ====== SEARCH FORM ====== */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-start; 
  width: 100%;
}

.search-progress-indicator {
    display: flex;
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    text-align: center; 
    padding: 20px;
    color: #333;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-top: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    /* display: block; is fine, d-none will toggle it */
}

.search-progress-indicator.d-none {
    display: none !important;
}

/* New spinner styles */
.spinner-wheel {
  border: 5px solid rgba(0, 0, 0, 0.1); /* Lighter track */
  width: 40px; /* Increased size */
  height: 40px; /* Increased size */
  border-radius: 50%;
  border-left-color: #007bff; /* Bootstrap primary blue, or your theme color */
  animation: spin 1s linear infinite; /* Smoother animation */
  margin-bottom: 12px; /* Space between spinner and percentage */
}

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

/* Styles for the percentage text */
.progress-percentage {
    font-size: 1.3em; /* Make percentage prominent */
    font-weight: bold;
    color: #1a1a1a; /* Darker color for percentage */
    margin-bottom: 6px; /* Space between percentage and message text */
}

/* Styles for the textual message part */
.progress-message-text {
    font-size: 0.95em; /* Slightly smaller for the descriptive text */
    color: #555;
    line-height: 1.4;
}

.form-group {       /* Allow growing and shrinking */
  min-width: 200px;       /* Minimum width before wrapping */
  margin-bottom: 10px;
  position: relative;
}

/* UPDATED: Style for the button container */
.form-actions {
  display: flex;         /* Arrange buttons inside */
  gap: 10px;             /* Space between buttons */
  margin-left: auto;     /* <<< THIS PUSHES IT RIGHT */
  align-self: flex-start;  /* Align with bottom of inputs */
  flex-shrink: 0;      /* Prevent button container shrinking */
}

/* Map fullscreen mode */
#map.fullscreen {
  height: 600px !important;
  margin-bottom: 20px;
}

/* RESULTS HEADER LAYOUT (Add this section) */
.search-results-header {
  display: flex;                  /* Use flexbox */
  justify-content: space-between; /* Push items apart */
  align-items: center;            /* Vertically align items */
  width: 100%;                    /* Take full width */
  margin-bottom: 15px;            /* Add some space below the header */
}

/* Optional: Ensure download button doesn't grow */
.search-results-header .search-btn {
  flex-shrink: 0;
}


/* ====== FORM CONTROLS ====== */
/* Remove the business-type-input styling since we're using multiselect */
.business-type-input {
  display: none; /* Hide the original inputs */
}

/* Standard input styling for non-multiselect inputs */
input[type="text"]:not(.multiselect-filter),
input[type="password"],
input[type="number"],
textarea,
select:not(.multiselect-filter):not(.hidden-select) {
  width: 100%;
  padding: 12px;
  border: 2px solid #dcdee0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
  outline: none;
  height: 48px;
  background-color: white;
  color: #333;
}

/* Ensure standard select styling doesn't conflict with multiselect */
select:not(.hidden-select) {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 1em;
  padding-right: 30px;
  cursor: pointer;
}

/* Focus states for all form controls */
input:not(.multiselect-filter):focus, 
select:not(.hidden-select):focus,
textarea:focus,
.multiselect-dropdown:focus-within {
  border-color: #087aa8;
}

/* Remove any conflicting styling from the search form */
.search-form .form-group input[type="text"] {
  /* Override any specific styling that might conflict */
  width: 100%;
}

.search-form .form-group select {
  /* Ensure dropdowns don't have conflicting styles */
  width: 100%;
}

/* Checkbox styling */
input[type="checkbox"] {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  cursor: pointer;
}

/* Checkbox container styling */
.checkbox-container {
  position: relative;
  z-index: 5;
  cursor: default;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.checkbox-container:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.result-card input[type="checkbox"] {
  position: relative;
  z-index: 10;
}

/* Business Type Badges */
.type-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
  margin-right: 4px;
  white-space: nowrap;
  text-transform: capitalize;
}

/* Enhancement for status badges container */
.status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

/* Make location badge distinct */
.location-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #bbdefb;
}

/* Business details card - add business type */
.business-details-card .business-type {
  margin: 5px 0;
  font-size: 14px;
}

/* Make the business type badges more readable in details view */
.business-details-card .type-badge {
  font-size: 12px;
  padding: 3px 8px;
}
    
/* ====== RESPONSIVE FORM STYLES ====== */
@media (max-width: 768px) {
  .search-form {
    flex-direction: column;
    align-items: stretch; /* Make items full width */
  }
  .form-actions {
    margin-left: 0; /* Reset margin */
    margin-top: 10px;
    width: 100%;
    justify-content: flex-start; /* Or flex-end if you want buttons right-aligned */
  }
  .form-actions .search-btn {
        /* Let buttons size naturally or set specific widths */
        width: auto;
  }
}

/* Styles for the "All Counties" option */
.all-counties-option {
  background-color: #f8f9fa;
  border-bottom: 1px solid #eef1f5;
  margin-bottom: 5px;
  font-weight: 500;
  padding: 8px 12px;
  position: relative;
}

.all-counties-option label {
  font-weight: bold;
  color: #087aa8;
}

/* Style for the checkbox */
.all-counties-checkbox {
  accent-color: #087aa8;
}

/* Make the individual county options appear indented */
.county-option {
  padding-left: 24px !important;
  position: relative;
}

.county-option:before {
  content: "•";
  position: absolute;
  left: 12px;
  color: #aaa;
}

/* Style for the "All Counties" tags in the selection display */
.all-counties-tag {
  background-color: #e3f2fd;
  border-color: #bbdefb;
}

.all-counties-tag .tag-text {
  font-weight: 500;
  color: #0d47a1;
}

/* Add an indicator for states with "All Counties" selected */
.multiselect-group-header.all-selected:after {
  content: " (All)";
  color: #087aa8;
  font-weight: bold;
}