/* ACF AJAX Pro Filter Styles */

/* Results Grid Layout */
#directory-listing {
    transition: opacity 0.4s ease;
}

.acf-pro-results-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Individual Result Item */
.acf-pro-result-item {
    flex: 0 0 calc(33.333% - 14px);
    display: flex;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.acf-pro-result-item:hover {
    border: 2px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Result Image */
.acf-pro-result-image {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    overflow: hidden;
    padding:15px;
}

.acf-pro-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px !important;
}

/* Result Content */
.acf-pro-result-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Result Title */
.acf-pro-result-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 12px 0;
    padding: 0;
    line-height: 1.4;
}

.acf-pro-result-title .acf-pro-result-link {
    color: #8B0000;
    text-decoration: none;
}

.acf-pro-result-title .acf-pro-result-link:hover {
    color: #6B0000;
    text-decoration: underline;
}

/* Clinic Details */
.acf-pro-result-details {
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    padding-right:10px;
}

.acf-pro-result-details p {
    margin: 0 0 10px 0;
}

.acf-pro-result-details ul,
.acf-pro-result-details ol {
    margin: 0 0 10px 20px;
    padding: 0;
}

.acf-pro-result-details li {
    margin-bottom: 5px;
}

/* Linked image */
.acf-pro-result-image .acf-pro-result-link {
    display: block;
    text-decoration: none;
}

/* No Results Message */
.acf-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Search and Filter Bar */
.acf-pro-wrapper {
    margin-bottom: 30px;
}

.acf-pro-toolbar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.acf-pro-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.acf-pro-search,
.acf-pro-sort,
.acf-pro-filter {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.acf-pro-search {
    flex: 1;
    min-width: 250px;
}

.acf-pro-sort {
    min-width: 150px;
}

.acf-pro-clear {
    padding: 10px 20px;
    background: #8B0000;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.acf-pro-clear:hover {
    background: #6B0000;
}

/* Loading and Meta */
.acf-pro-meta {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 14px;
}

.acf-pro-count {
    color: #666;
}

.acf-pro-loading {
    color: #8B0000;
    font-weight: 500;
}

/* Pagination Styles */
.acf-pro-pagination {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.acf-pro-pagination-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.acf-pro-page-link,
.acf-pro-page-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
}

.acf-pro-page-link:hover {
    background: #8B0000;
    color: white;
    border-color: #8B0000;
}

.acf-pro-page-current {
    background: #8B0000;
    color: white;
    border-color: #8B0000;
    cursor: default;
}

.acf-pro-pagination-info {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Responsive Layout */
@media (max-width: 1024px) {
    .acf-pro-result-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .acf-pro-result-item {
        flex: 0 0 100%;
        flex-direction: column;
    }

    .acf-pro-result-image {
        width: 100%;
        height: 220px;
    }

    .acf-pro-toolbar {
        flex-direction: column;
    }

    .acf-pro-search,
    .acf-pro-sort {
        width: 100%;
    }
}
