/* Chiropractor Directory Styles - CNS Blue Theme Integration */

/* Search functionality */
.chiro-directory-search {
    margin-bottom: 30px;
    background: #e4f3f9; /* CNS Accent / Four - Very light blue */
    padding: 20px;
    border-radius: 2px;
    border: 1px solid #87d5f6; /* CNS Teal */
    font-family: "Neufreit", sans-serif;
}

.chiro-directory-search h3 {
    margin-top: 0;
    color: #035088; /* CNS Primary Blue */
    font-size: 18px;
    margin-bottom: 15px;
    font-family: "Neufreit", sans-serif;
    font-weight: 600;
}

#chiro-search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #57c7df; /* CNS Accent Three */
    border-radius: 2px;
    overflow: hidden;
}

#chiro-search-input {
    flex: 1;
    border: none;
    padding: 12px 15px;
    font-size: 15px;
    font-family: "Neufreit", sans-serif;
    color: #035088; /* CNS Primary Blue */
}

#chiro-search-input:focus {
    border-color: #035088; /* CNS Primary Blue */
    outline: 2px solid rgba(3, 80, 136, 0.1);
}

#chiro-search-input::placeholder {
    color: #57c7df; /* CNS Accent Three */
    font-weight: normal;
    font-family: "Neufreit", sans-serif;
}

/* Clear search button */
#chiro-search-clear {
    background: #035088; /* CNS Primary Blue */
    color: white;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: none;
    font-family: "Neufreit", sans-serif;
}

#chiro-search-clear:hover {
    background: #13345b; /* CNS Accent Five - Darker blue */
}

/* Sort Controls */
.chiro-sort-controls {
    margin-top: 15px;
    font-family: "Neufreit", sans-serif;
}

.sort-controls-label {
    display: block;
    color: #035088; /* CNS Primary Blue */
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.sort-buttons-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sort-button {
    padding: 8px 12px;
    background: white;
    border: 1px solid #57c7df; /* CNS Accent Three */
    border-radius: 2px;
    color: #035088; /* CNS Primary Blue */
    font-family: "Neufreit", sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sort-button:hover {
    background: #e4f3f9; /* CNS Accent Four - Very light blue */
    border-color: #87d5f6; /* CNS Light Blue */
    color: #13345b; /* CNS Dark Blue */
}

.sort-button.active {
    background: #035088; /* CNS Primary Blue */
    color: white;
    border-color: #035088;
}

.sort-button.active:hover {
    background: #13345b; /* CNS Dark Blue */
    border-color: #13345b;
}

/* Sort button focus styles for accessibility */
.sort-button:focus {
    outline: 2px solid #87d5f6; /* CNS Light Blue */
    outline-offset: 2px;
}

/* City headings for city sort */
.city-heading {
    margin: 20px 0 15px 0;
    padding: 10px 15px;
    background: #e4f3f9; /* CNS Accent Four - Very light blue */
    border-left: 4px solid #035088; /* CNS Primary Blue */
    border-radius: 2px;
}

.city-heading h4 {
    margin: 0;
    color: #035088; /* CNS Primary Blue */
    font-family: "Neufreit", sans-serif;
    font-size: 16px;
    font-weight: 600;
}

.city-heading:first-child {
    margin-top: 0;
}

/* Hide city headings with no visible results */
.city-heading[style*="display: none"] {
    display: none !important;
}

/* Directory container */
.chiro-directory-container {
    max-width: 1200px;
    font-family: "Neufreit", sans-serif;
}

/* Listings grid/container */
.chiro-listings-grid {
    display: block;
}

/* Individual chiropractor listing */
.chiro-listing {
    margin: 7px 7px 25px 4px;
    padding: 20px;
    background: white;
    border-radius:2px;
    border: 1px solid #87d5f6; /* CNS Teal border */
    box-shadow: 0 1px 3px rgba(3, 80, 136, 0.1);
    transition: box-shadow 0.3s ease;
}

.chiro-listing:hover {
    box-shadow: 0 2px 6px rgba(3, 80, 136, 0.2);
    border-color: #57c7df; /* CNS Accent Three */
}

/* Chiropractor header */
.chiro-header {
    margin-bottom: 15px;
}

.chiro-info {
    width: 100%;
}

.chiro-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #035088; /* CNS Primary Blue */
    font-family: "Neufreit", sans-serif;
}

.chiro-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Clickable chiropractor names for map centering */
.chiro-name a.map-clickable {
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.chiro-name a.map-clickable:hover {
    color: #57c7df; /* CNS Accent Three */
    text-decoration: none;
}

.chiro-name a.map-clickable:after {
    content: "📍";
    font-size: 14px;
    margin-left: 8px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    color: #87d5f6; /* CNS Teal */
}

.chiro-name a.map-clickable:hover:after {
    opacity: 1;
}

.chiro-name a:hover {
    color: #57c7df; /* CNS Accent Three */
    text-decoration: none;
}

.chiro-summary {
    color: #666;
    margin-bottom: 10px;
    font-style: italic;
    font-family: "Neufreit", sans-serif;
}

/* Locations section */
.chiro-locations {
    margin-top: 15px;
}

.chiro-locations-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: #035088; /* CNS Primary Blue */
    font-size: 16px;
    font-family: "Neufreit", sans-serif;
}

.location-item {
    background: #ffffff;
    border: 1px solid #87d5f6; /* CNS Teal */
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.location-item:hover {
    background: #e4f3f9; /* CNS Accent Four - Very light blue */
    border-color: #57c7df; /* CNS Accent Three */
}

/* Clickable location items */
.location-item.location-clickable {
    cursor: pointer;
    position: relative;
}

.location-item.location-clickable:hover {
    background: #e4f3f9; /* CNS Accent Four */
    border-color: #035088; /* CNS Primary Blue */
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(3, 80, 136, 0.15);
}

.location-item.location-clickable:after {
    content: "🗺️ Click to view on map";
    font-size: 11px;
    color: #035088; /* CNS Primary Blue */
    position: absolute;
    top: 8px;
    right: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 500;
    font-family: "Neufreit", sans-serif;
}

.location-item.location-clickable:hover:after {
    opacity: 1;
}

.location-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #035088; /* CNS Primary Blue */
    font-size: 16px;
    font-family: "Neufreit", sans-serif;
}

.location-name a.map-clickable:hover:after {
    opacity: 1;
}

.location-name a:hover {
    color: #57c7df; /* CNS Accent Three */
}

.location-address {
    color: #13345b; /* CNS Accent Five - Dark blue for readability */
    margin-bottom: 5px;
    font-size: 14px;
    font-family: "Neufreit", sans-serif;
}

.location-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    font-family: "Neufreit", sans-serif;
}

.location-phone,
.location-email,
.location-website {
    color: #13345b; /* CNS Accent Five */
}

.location-phone a,
.location-email a,
.location-website a {
    color: #035088; /* CNS Primary Blue */
    text-decoration: none;
    position: relative;
    z-index: 10; /* Ensure links are clickable over the location item */
    font-family: "Neufreit", sans-serif;
}

.location-phone a:hover,
.location-email a:hover,
.location-website a:hover {
    text-decoration: underline;
    color: #57c7df; /* CNS Accent Three */
}

/* No results message */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #13345b; /* CNS Accent Five */
    font-style: italic;
    background: #e4f3f9; /* CNS Accent Four */
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #87d5f6; /* CNS Teal */
    font-family: "Neufreit", sans-serif;
}

/* Search highlighting */
.search-highlight {
    background-color: #87d5f6; /* CNS Teal background */
    color: #035088; /* CNS Primary Blue text */
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* Loading state */
.chiro-directory-loading {
    text-align: center;
    padding: 20px;
    color: #035088; /* CNS Primary Blue */
    font-family: "Neufreit", sans-serif;
}

.chiro-directory-loading:before {
    content: "⟳";
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    font-size: 18px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Results count */
.search-results-count {
    margin-bottom: 20px;
    color: #13345b; /* CNS Accent Five */
    font-style: italic;
    font-family: "Neufreit", sans-serif;
}

/* Responsive design */
@media (max-width: 768px) {
    .location-contact {
        flex-direction: column;
        gap: 8px;
    }
    
    #chiro-search-wrapper {
        flex-direction: column;
    }
    
    #chiro-search-clear {
        border-radius: 0 0 4px 4px;
    }

    .chiro-sort-controls {
        margin-top: 10px;
    }
    
    .sort-buttons-container {
        flex-direction: column;
        gap: 6px;
    }
    
    .sort-button {
        width: 100%;
        text-align: center;
    }

    .chiro-listing {
        margin: 5px 0 20px 0;
        padding: 15px;
    }

    .chiro-name {
        font-size: 20px;
    }

    .location-item.location-clickable:after {
        font-size: 10px;
        top: 6px;
        right: 8px;
    }
}

/* Alphabetical navigation (if we add it later) */
.alpha-nav {
    background: #e4f3f9; /* CNS Accent Four */
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #87d5f6; /* CNS Teal */
    font-family: "Neufreit", sans-serif;
}

.alpha-nav a {
    display: inline-block;
    padding: 5px 8px;
    margin: 2px;
    text-decoration: none;
    color: #035088; /* CNS Primary Blue */
    border-radius: 3px;
    transition: all 0.3s ease;
    font-family: "Neufreit", sans-serif;
}

.alpha-nav a:hover,
.alpha-nav a.active {
    background: #035088; /* CNS Primary Blue */
    color: white;
}

/* Custom Leaflet popup styling */
.leaflet-popup-content {
    font-family: "Neufreit", sans-serif;
    color: #035088; /* CNS Primary Blue */
    font-size: 15px;
    line-height: 1.5;
}
.leaflet-popup-content h4 {
    margin: 0 0 00!important;
    font-size: 17px;
    color: #035088;
    font-weight: 700;
}
.leaflet-popup-content p {
    margin: 0 0 0 0!important;
}
.leaflet-popup-content a {
    color: #57c7df; /* CNS Accent Three */
    text-decoration: underline;
}
.leaflet-popup-tip,
.leaflet-popup-content-wrapper {
    background: #e4f3f9; /* CNS Accent Four - Very light blue */
    border-radius: 8px;
    border: 1px solid #87d5f6;
}

/* End of file */
