/* =============================================
   Provider Search – Front-end Styles
   Brand: #0066b1  |  Font: Open Sans
   ============================================= */

/* --- Reset & Base --- */
.ps-wrap {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.ps-wrap *, .ps-wrap *::before, .ps-wrap *::after {
    box-sizing: border-box;
}

.ps-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Filters --- */
.ps-filters {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ps-filter-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    flex-wrap: wrap;
}

.ps-filter-search {
    flex: 2;
    min-width: 240px;
}

.ps-filter-field {
    flex: 1;
    min-width: 180px;
}

.ps-input-icon {
    position: relative;
}

.ps-icon-search {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #94a3b8;
    pointer-events: none;
}

.ps-input-icon input {
    padding-left: 42px !important;
}

.ps-filters input,
.ps-filters select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #1e293b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.ps-filters select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.ps-filters input:focus,
.ps-filters select:focus {
    border-color: #0066b1;
    box-shadow: 0 0 0 3px rgba(0, 102, 177, 0.12);
    background: #fff;
}

.ps-filters input::placeholder {
    color: #94a3b8;
}

/* --- Results Meta --- */
.ps-results-meta {
    margin-bottom: 16px;
    font-size: 14px;
    color: #64748b;
    min-height: 22px;
}

#ps-count strong {
    color: #1e293b;
}

/* --- Grid --- */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .ps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .ps-grid {
        grid-template-columns: 1fr;
    }
    .ps-filter-row {
        flex-direction: column;
    }
}

/* --- Card --- */
.ps-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ps-card:hover {
    box-shadow: 0 4px 16px rgba(0, 102, 177, 0.10);
    transform: translateY(-2px);
}

/* Card Header */
.ps-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ps-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ps-card-avatar-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066b1 0%, #004a80 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.ps-card-title-group {
    min-width: 0;
}

.ps-card-name {
    font-size: 16px;
    font-weight: 700;
    color: #0066b1;
    margin: 0 0 2px;
    line-height: 1.3;
}

.ps-card-name a {
    color: inherit;
    text-decoration: none;
}

.ps-card-name a:hover {
    text-decoration: underline;
}

.ps-card-location {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* Tags */
.ps-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ps-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 10px;
    background: rgba(0, 102, 177, 0.08);
    color: #0066b1;
    border-radius: 100px;
}

/* Description */
.ps-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
}

/* Meta Rows (sites, languages, graduate school) */
.ps-card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.ps-card-meta-item {
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
    margin: 0;
    overflow-wrap: anywhere;
}

.ps-card-meta-label {
    font-weight: 600;
    color: #334155;
}

/* Contact Row */
.ps-card-contact {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.ps-card-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #475569;
}

.ps-card-contact-item svg {
    width: 15px;
    height: 15px;
    color: #94a3b8;
    flex-shrink: 0;
}

.ps-card-contact-item a {
    color: #0066b1;
    text-decoration: none;
}

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

/* --- Load More --- */
.ps-load-more-wrap {
    text-align: center;
    margin-top: 32px;
}

.ps-btn {
    display: inline-block;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #0066b1;
    background: transparent;
    border: 2px solid #0066b1;
    border-radius: 8px;
    padding: 10px 32px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ps-btn:hover {
    background: #0066b1;
    color: #ffffff;
}

/* --- Loading Spinner --- */
.ps-loading {
    text-align: center;
    padding: 40px 0;
}

.ps-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #0066b1;
    border-radius: 50%;
    margin: 0 auto;
    animation: ps-spin 0.7s linear infinite;
}

@keyframes ps-spin {
    to { transform: rotate(360deg); }
}

/* --- No Results --- */
.ps-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.ps-icon-empty {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.ps-no-results p {
    font-size: 15px;
    margin: 0;
}
