/**
 * Workplace Health Provider Hub - Search Styles
 */

/* Search Container */
.ppm-search-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.ppm-search-header {
    margin-bottom: 20px;
}

.ppm-search-header h2 {
    color: #1e3a5f;
    margin-bottom: 5px;
}

.ppm-search-header p {
    color: #666;
    margin: 0;
}

/* Filter Section */
.ppm-search-filters {
    background: #f8f9fa;
    border: 1px solid #dde5ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.ppm-search-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.ppm-search-row:last-of-type {
    margin-bottom: 0;
}

.ppm-search-field {
    flex: 1;
    min-width: 180px;
}

.ppm-search-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e3a5f;
    font-size: 13px;
}

.ppm-search-field-checkbox {
    display: flex;
    align-items: flex-end;
    padding-bottom: 5px;
}

.ppm-search-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
    white-space: nowrap;
}

.ppm-search-field-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.ppm-input-short {
    max-width: 160px;
}

.ppm-search-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #dde5ed;
}

.ppm-search-distance-row {
    padding-top: 10px;
    border-top: 1px dashed #c5d0dc;
}

.ppm-search-distance-label {
    display: flex;
    align-items: flex-end;
    padding-bottom: 5px;
    font-weight: 600;
    color: #1e3a5f;
    font-size: 13px;
    min-width: 140px;
    flex: 0;
    white-space: nowrap;
}

.ppm-search-distance-note {
    display: flex;
    align-items: flex-end;
    padding-bottom: 6px;
}

.ppm-search-distance-note small {
    color: #888;
    font-style: italic;
}

/* Results */
.ppm-search-results {
    margin-top: 20px;
}

.ppm-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.ppm-search-results-header h3 {
    color: #1e3a5f;
    margin: 0;
}

.ppm-result-count {
    color: #666;
    font-size: 14px;
    background: #eee;
    padding: 4px 12px;
    border-radius: 12px;
}

.ppm-search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Result Card */
.ppm-search-result-card {
    background: #fff;
    border: 1px solid #dde5ed;
    border-radius: 8px;
    padding: 18px;
    transition: box-shadow 0.2s;
}

.ppm-search-result-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.ppm-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.ppm-result-name {
    color: #1e3a5f;
    margin: 0;
    font-size: 16px;
}

.ppm-result-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ppm-badge-specialty {
    background: #e3f2fd;
    color: #1565c0;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.ppm-badge-subspecialty {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 12px;
}

.ppm-result-body {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.ppm-result-info {
    flex: 1;
    min-width: 250px;
}

.ppm-result-info p {
    margin: 4px 0;
    font-size: 13px;
    color: #444;
}

.ppm-result-info a {
    color: #0073aa;
    text-decoration: none;
}

.ppm-result-info a:hover {
    text-decoration: underline;
}

.ppm-result-meta {
    text-align: right;
    min-width: 160px;
}

.ppm-result-rating {
    margin-bottom: 8px;
}

.ppm-stars {
    color: #f0ad4e;
    font-size: 16px;
    letter-spacing: 1px;
}

.ppm-rating-text {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-left: 4px;
}

.ppm-rating-count {
    color: #888;
    font-size: 12px;
}

.ppm-no-rating .ppm-rating-text {
    font-weight: normal;
    color: #999;
    font-size: 12px;
}

.ppm-result-distance {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

.ppm-distance-icon {
    font-size: 14px;
}

.ppm-distance-text {
    font-size: 13px;
    color: #555;
    font-weight: 600;
}

/* No Results */
.ppm-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

/* Loading */
.ppm-search-loading {
    text-align: center;
    padding: 40px 20px;
}

.ppm-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #ddd;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: ppm-spin 0.8s linear infinite;
}

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

/* Responsive */
@media (max-width: 600px) {
    .ppm-search-row {
        flex-direction: column;
    }
    
    .ppm-search-field {
        min-width: 100%;
    }
    
    .ppm-input-short {
        max-width: 100%;
    }
    
    .ppm-result-header {
        flex-direction: column;
    }
    
    .ppm-result-body {
        flex-direction: column;
    }
    
    .ppm-result-meta {
        text-align: left;
    }
    
    .ppm-result-distance {
        justify-content: flex-start;
    }
}

/* Optional label */
.ppm-optional {
    font-weight: normal;
    color: #888;
    font-size: 11px;
}
