/* Iowa Service Finder Styles */
.services-search__results__result {
  padding: 40px 40px 40px 100px;
  position: relative;
  border-radius: 30px;
  corner-shape: squircle;
}
.services-search__results__result:before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  counter-increment: result-count; /* Adds 1 to the counter */
  content: counter(result-count); /* Displays "1. ", "2. ", etc. */
  color: white; /* Optional styling for the number */
  background-color: var(--dark-green);
  height: 60px;
  width: 60px;
  border-radius: 50%;
  font-weight: bold;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
}
.services-search__results__result:nth-child(2n-1) {
  background-color: #f4f4f4;
}
.services-search__results__result a {
  color: var(--light-med-green);
}
.services-search__results__result .button {
  color: var(--dark-green);
}
.services-search__results__result h3 {
  font-size: 1.5rem;
}
.isf-search-form input[type="text"] {
  padding: 0.75rem 1.875rem;
  border: 1px solid;
}
.isf-search-form .js-select-wrapper svg path {
  fill: #332853;
}
/* Skip Link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 999999;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  left: 6px;
  top: 6px;
}

/* Screen Reader Text */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
  border: 0;
  box-shadow: none;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  color: #21759b;
  display: block;
  font-size: 14px;
  font-size: 0.875rem;
  font-weight: bold;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

.isf-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.isf-header {
  margin-bottom: 30px;
}

.isf-header h1 {
  color: #2c3e50;
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.isf-content {
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Search Form Styles */
.isf-search-section {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  corner-shape: squircle;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.isf-search-section fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.isf-search-section legend {
  padding: 0;
  margin: 0;
}

.isf-form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.isf-search-form select,
.isf-search-form input[type="text"] {
  background-color: #ffffff;
}

.isf-form-group {
  flex: 1;
  min-width: 200px;
}

.isf-form-group label {
  font-size: 1rem;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
  color: #332853;
}

.isf-form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-start;
}

.isf-form-actions .button {
  background-color: #332853;
  color: #ffffff;
}
.isf-form-actions .button--outline {
  background-color: transparent;
  color: #332853;
  border: 2px solid #332853;
}

/* Main Content Layout */
.isf-main-content {
  margin-bottom: 30px;
}

/* Map Styles */
.isf-map-container {
  background: white;
  padding: 25px;
  border-radius: 10px;
  corner-shape: squircle;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.isf-map-container h3 {
  margin-bottom: 10px;
}

#isf-iowa-map {
  border: 2px solid #ddd;
  border-radius: 8px;
  corner-shape: squircle;
  overflow: hidden;
  background: #f0f8ff;
  margin-bottom: 15px;
}

#iowa-map {
  width: 100%;
  height: auto;
  display: block;
}

/* County path styles - override SVG internal styles */
.county-path {
  fill: #e8f4f8 !important;
  stroke: #2c3e50 !important;
  stroke-width: 1 !important;
  cursor: pointer;
  transition: all 0.3s ease;
}

.county-path:hover {
  fill: #3498db !important;
  stroke-width: 2 !important;
}

/* County group selection */
.county-group.selected .county-path {
  fill: #2980b9 !important;
  stroke: #1a5c87 !important;
  stroke-width: 2 !important;
}

/* County group hover effects */
.county-group:hover .county-path {
  fill: #3498db !important;
  stroke-width: 2 !important;
}

/* Make sure links are clickable */
#iowa-map a {
  cursor: pointer;
}

/* Override any SVG internal styles */
#iowa-map .county-path {
  transition:
    fill 0.2s ease,
    stroke 0.2s ease,
    stroke-width 0.2s ease !important;
}

/* Focus styles for accessibility */
.isf-select:focus,
.isf-input:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
  border-color: #005fcc;
  box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.1);
}

.isf-button:focus,
button:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Map accessibility */
#isf-iowa-map {
  border: 2px solid transparent;
  border-radius: 4px;
  corner-shape: squircle;
}

#isf-iowa-map:focus {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

#iowa-map a:focus .county-path {
  fill: #3498db !important;
  stroke-width: 2 !important;
  outline: 2px solid #3498db;
}

/* Focus styles for accessible county paths */
.county-path:focus {
  fill: #3498db !important;
  stroke: #005fcc !important;
  stroke-width: 2 !important;
  outline: 2px solid #005fcc;
  outline-offset: 1px;
}

/* Hover and focus-visible for better interaction */
.county-path:hover,
.county-path:focus-visible {
  fill: #3498db !important;
}

.isf-map-instructions {
  color: #666;
  font-style: italic;
  margin: 0;
  text-align: center;
}

/* Results Styles */
.isf-results-container {
  background: white;
  padding: 25px;
  border-radius: 10px;
  corner-shape: squircle;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.isf-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #eee;
}

.isf-results-header h3 {
  color: #2c3e50;
  margin: 0;
  font-size: 1.5rem;
}

.isf-count {
  background: #332853;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  corner-shape: squircle;
  font-size: 14px;
  font-weight: 600;
}

/* Loading Animation */
.isf-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 40px;
  color: #666;
}

.isf-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f0f0f0;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: isf-spin 1s linear infinite;
}

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

/* Results List */
.isf-results {
  overflow-y: auto;
  overflow-x: hidden;
  counter-reset: result-count;
}

.isf-service-item {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.isf-service-item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.isf-service-title {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.isf-service-title a {
  color: inherit;
  text-decoration: none;
}

.isf-service-title a:hover {
  color: #3498db;
}

.isf-service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.isf-meta-item {
  background: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #ddd;
}

.isf-meta-counties {
  background-color: #e8f8f5;
  color: #27ae60;
}
.isf-meta-categories {
  background-color: #fef9e7;
  color: #f39c12;
}
.isf-meta-models {
  background-color: #ebf3fd;
  color: #3498db;
}

/* Service Category Tags */
.service-categories {
  margin-bottom: 15px;
}

.service-category-tag {
}

.service-category-tag:last-child {
  margin-right: 0;
}

/* Service Scope Indicators */
.service-scope-indicators {
  margin-bottom: 15px;
  text-align: right;
}

.service-scope-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  margin-bottom: 5px;
  border: 1px solid;
}

.service-scope-tag.statewide {
  background-color: #332853;
  color: #ffffff;
  border-color: #332853;
}

.service-scope-tag.virtual {
  background-color: transparent;
  color: #332853;
  border-color: #332853;
}

.service-scope-tag:last-child {
  margin-right: 0;
}

.isf-service-description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.isf-service-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  font-size: 14px;
}

.isf-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
}

.isf-contact-item strong {
  color: #2c3e50;
}

.isf-contact-item a {
  color: #3498db;
  text-decoration: none;
}

.isf-contact-item a:hover {
  text-decoration: underline;
}

.isf-no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.isf-no-results p {
  font-size: 1.1rem;
  margin: 0;
}

/* County Tooltip */
.county-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.2s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .isf-main-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .isf-form-row {
    flex-direction: column;
    gap: 15px;
  }

  .isf-form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .isf-results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .isf-service-contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .isf-container {
    padding: 15px;
  }

  .isf-search-section {
    padding: 20px;
  }

  .isf-map-container,
  .isf-results-container {
    padding: 20px;
  }

  .isf-header h1 {
    font-size: 2rem;
  }
}
