/* Scoped styles for the Find a Therapist results/directory page */

#rf-widget {
    font-family: 'Roboto', sans-serif;
    color: #333;
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
}

#rf-widget *,
#rf-widget *:before,
#rf-widget *:after {
    box-sizing: inherit;
}

#rf-widget h2 {
    color: rgb(145, 69, 71);
    font-size: 26px;
    margin: 0 0 20px;
    font-weight: 500;
}

#rf-widget #rf-count {
    color: #666;
    font-size: 14px;
    margin: 0 0 20px;
}

#rf-widget #rf-count strong {
    color: #333;
}

/* Active filter chips */
#rf-widget #rf-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    min-height: 1px;
}

#rf-widget .rf-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgb(145, 69, 71);
    color: #fff;
    border-radius: 20px;
    padding: 4px 8px 4px 10px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#rf-widget .rf-active-chip button {
    border: none;
    background: none;
    color: #fff;
    opacity: 0.8;
    cursor: pointer;
    font-size: 11px;
    line-height: 1;
    padding: 1px;
}

#rf-widget .rf-active-chip button:hover {
    opacity: 1;
}

#rf-widget .rf-clear-all {
    font-size: 12.5px;
    color: #009391;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

#rf-widget .rf-clear-all:hover {
    text-decoration: underline;
}

/* Filter bar */
#rf-widget #rf-filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 26px;
    position: relative;
}

#rf-widget .rf-filter {
    position: relative;
}

#rf-widget .rf-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 20px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    font-family: inherit;
}

#rf-widget .rf-filter-btn:hover {
    border-color: #009391;
}

#rf-widget .rf-filter.rf-has-selection .rf-filter-btn {
    background: #009391;
    border-color: #009391;
    color: #fff;
}

#rf-widget .rf-filter-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 14px;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
}

#rf-widget .rf-filter-panel.rf-hidden {
    display: none;
}

#rf-widget .rf-filter-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 4px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

#rf-widget .rf-filter-option:hover {
    background: #f5f5f5;
}

#rf-widget .rf-filter-option input {
    accent-color: #009391;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

#rf-widget .rf-filter-panel-clear {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    font-size: 12.5px;
    color: #009391;
    font-weight: 600;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

/* Results list */
#rf-widget #rf-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#rf-widget .rf-section-divider {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #999;
    padding-top: 10px;
    border-top: 1px solid #e5e5e5;
}

#rf-widget .rf-result-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    grid-template-areas: "avatar name actions" "avatar body actions";
    column-gap: 22px;
    row-gap: 10px;
    align-items: start;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

#rf-widget .rf-avatar {
    grid-area: avatar;
    width: 110px;
    height: 110px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #eee;
    flex-shrink: 0;
}

#rf-widget .rf-result-name-block {
    grid-area: name;
}

#rf-widget .rf-result-body {
    grid-area: body;
}

#rf-widget .rf-result-name {
    font-family: Georgia, 'Iowan Old Style', serif;
    font-size: 20px;
    margin: 0 0 3px;
    color: rgb(145, 69, 71);
}

#rf-widget .rf-result-name a {
    color: inherit;
    text-decoration: none;
}

#rf-widget .rf-result-name a:hover {
    text-decoration: underline;
}

#rf-widget .rf-result-credential {
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    font-weight: 400;
    color: #706462;
}

#rf-widget .rf-chevron {
    display: inline-block;
    margin-left: 4px;
    color: #009391;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
}

#rf-widget .rf-result-meta {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

#rf-widget .rf-badge-accepting {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #007c7a;
    font-weight: 600;
}

#rf-widget .rf-badge-accepting .rf-dot {
    width: 7px;
    height: 7px;
    background: #009391;
    border-radius: 50%;
    display: inline-block;
}

#rf-widget .rf-badge-limited {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #8a7a55;
    font-weight: 600;
}

#rf-widget .rf-badge-limited .rf-dot {
    width: 7px;
    height: 7px;
    background: #c4a94f;
    border-radius: 50%;
    display: inline-block;
}

#rf-widget .rf-pull-quote {
    font-style: italic;
    color: #444;
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 12px;
    max-width: 62ch;
    border-left: 2px solid #009391;
    padding-left: 12px;
}

#rf-widget .rf-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#rf-widget .rf-tag {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #f5f7f7;
    border: 1px solid #eee;
    color: #666;
    padding: 4px 10px;
    border-radius: 20px;
}

#rf-widget .rf-tag.rf-tag-match {
    color: #007c7a;
    border-color: #009391;
    background: #f0fcfc;
}

#rf-widget .rf-result-actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 178px;
    flex-shrink: 0;
}

#rf-widget .rf-btn {
    display: block;
    text-align: center;
    padding: 11px 14px;
    border-radius: 4px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

#rf-widget .rf-btn-primary {
    background: rgb(145, 69, 71);
    color: #fff;
}

#rf-widget .rf-btn-primary:hover {
    background: rgb(165, 80, 82);
}

#rf-widget .rf-btn-outline {
    background: transparent;
    border: 1.5px solid #009391;
    color: #009391;
}

#rf-widget .rf-btn-outline:hover {
    background: #009391;
    color: #fff;
}

/* Empty state */
#rf-widget #rf-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
}

#rf-widget #rf-empty-state h3 {
    color: rgb(145, 69, 71);
    margin: 0 0 10px;
}

#rf-widget #rf-empty-state p {
    color: #666;
    margin: 0 0 18px;
}

/* Mobile: rows become stacked cards */
@media (max-width: 720px) {
    #rf-widget .rf-result-row {
        grid-template-columns: 64px 1fr;
        grid-template-areas: "avatar name" "body body" "actions actions";
        row-gap: 12px;
    }

    #rf-widget .rf-avatar {
        width: 64px;
        height: 64px;
    }

    #rf-widget .rf-result-name-block {
        align-self: center;
    }

    #rf-widget .rf-result-actions {
        flex-direction: row;
        width: 100%;
    }

    /* Anchoring the panel to its own (often narrow, off-center) trigger
       button let it overflow past the viewport edge on mobile. Instead,
       pin it to the viewport with fixed side margins — its vertical
       position is set inline by JS (see results.js) to sit just below
       whichever button opened it. */
    #rf-widget .rf-filter-panel {
        position: fixed;
        left: 12px;
        right: 12px;
        width: auto;
        min-width: 0;
        max-height: 60vh;
    }
}
