/* =========================================================
   RESEARCHERS DIRECTORY
   Find Researchers and Research Consultants pages
   (template-parts/researcher-*.php). Consultants' own hero and
   browse sections stay in page-research-consultants.php.
   ========================================================= */

/* =========================================================
   BODY LAYOUT
   ========================================================= */

.rb-fr-body__layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 30px;
    align-items: start;
}

/* ---------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------- */

.rb-fr-sidebar-col {
    min-width: 0;
}

.rb-fr-sidebar-col__inner {
    display: flex;
    flex-direction: column;
}

.rb-fr-sidebar-col .rb-material-search {
    flex: 0 0 auto;
    margin-bottom: 14px;
}

.rb-fr-sidebar-col .rb-material-search__input {
    height: 46px;
    border-color: #e5eaf1;
    border-radius: 12px;
}

.rb-fr-sidebar {
    padding: 22px;
    border: 1px solid #e5eaf1;
    border-radius: 12px;
    background: #fff;
}

/* Search beside the Filters button; the panel becomes a drawer. */
@media (max-width: 900px) {
    .rb-fr-sidebar-col__inner {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .rb-fr-sidebar-col .rb-material-search {
        flex: 1;
        min-width: 0;
        margin-bottom: 0;
    }

    .rb-fr-sidebar-col .rb-material-search__input {
        border-radius: 10px;
        font-size: 16px; /* 16px stops iOS zooming in on focus */
    }

    .rb-fr-sidebar-col .rb-filter-drawer-toggle {
        flex: 0 0 auto;
    }
}

.rb-fr-sidebar__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.rb-fr-sidebar__top h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 700;
}

.rb-fr-sidebar__top a {
    color: #2f6fd1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.rb-fr-filter {
    padding: 16px 0;
    border-top: 1px solid #eef1f6;
}

.rb-fr-sidebar__top + .rb-fr-filter {
    border-top: 0;
    padding-top: 0;
}

.rb-fr-filter__title {
    margin: 0 0 12px;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
}

.rb-fr-filter__select {
    position: relative;
    margin-bottom: 12px;
}

.rb-fr-filter__select input,
.rb-fr-filter__select select {
    width: 100%;
    height: 40px;
    padding: 0 34px 0 12px;
    border: 1px solid #dde4ee;
    border-radius: 8px;
    background: #fff;
    color: #33415f;
    font-family: inherit;
    font-size: 14px;
    appearance: none;
}

.rb-fr-filter__select i {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: #8896b3;
    font-size: 12px;
    pointer-events: none;
}

.rb-fr-check {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    cursor: pointer;
}

.rb-fr-check.rb-fr-hidden {
    display: none;
}

.rb-fr-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

.rb-fr-check span {
    flex: 1;
    color: #33415f;
    font-size: 14px;
}

.rb-fr-check em {
    color: #8896b3;
    font-size: 14px;
    font-style: normal;
}

.rb-fr-filter__more {
    display: inline-block;
    margin-top: 2px;
    color: #2f6fd1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.rb-fr-sidebar__apply {
    display: none;
    width: 100%;
    justify-content: center;
    margin-top: 6px;
}

/* Only in the mobile filter drawer (same breakpoint as style.css). */
@media (max-width: 900px) {
    .rb-fr-sidebar__apply {
        display: inline-flex;
    }
}

/* ---------------------------------------------------------
   CONTENT TOP BAR
   --------------------------------------------------------- */

.rb-fr-content__top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}

.rb-fr-content__top h2 {
    margin: 0 0 4px;
    color: var(--color-primary);
    font-size: 24px;
    font-weight: 700;
}

.rb-fr-content__top > div > span {
    color: #66738a;
    font-size: 14px;
}

.rb-fr-content__controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rb-fr-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #33415f;
    font-size: 14px;
    font-weight: 500;
}

.rb-fr-sort select {
    height: 38px;
    padding: 0 10px;
    border: 1px solid #dde4ee;
    border-radius: 8px;
    background: #fff;
    color: #16233f;
    font-family: inherit;
    font-size: 14px;
}

.rb-fr-view {
    display: flex;
    gap: 6px;
    padding: 4px;
    border: 1px solid #dde4ee;
    border-radius: 8px;
}

.rb-fr-view__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #8896b3;
    cursor: pointer;
}

.rb-fr-view__btn--active {
    background: var(--color-primary);
    color: #fff;
}

/* ---------------------------------------------------------
   RESEARCHER ROWS
   --------------------------------------------------------- */

.rb-fr-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rb-fr-no-results {
    margin: 0;
    padding: 40px 20px;
    border: 1px dashed #dde4ee;
    border-radius: 12px;
    background: #f8fafc;
    color: #66738a;
    font-size: 15px;
    text-align: center;
}

.rb-fr-row {
    display: grid;
    grid-template-columns: 72px 1fr 150px 160px;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e5eaf1;
    border-radius: 12px;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rb-fr-row:hover {
    box-shadow: 0 8px 20px rgba(30, 56, 90, 0.08);
    transform: translateY(-1px);
}

.rb-fr-row__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #e4ecf7;
}

.rb-fr-row__main h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 4px;
    color: var(--color-primary);
    font-size: 19px;
    font-weight: 700;
}

.rb-fr-row__main h3 i {
    color: #2f6fd1;
    font-size: 15px;
}

.rb-fr-row__affiliation {
    margin: 0 0 4px;
    color: #33415f;
    font-size: 14px;
    font-weight: 500;
}

.rb-fr-row__fields {
    margin: 0 0 10px;
    color: #66738a;
    font-size: 14px;
}

.rb-fr-row__roles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.rb-fr-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.rb-fr-role i {
    font-size: 11px;
}

.rb-fr-role--blue { background: #eaf2fc; color: #2f6fd1; }
.rb-fr-role--green { background: #eafaf1; color: #2f9e58; }
.rb-fr-role--orange { background: #fdf1e4; color: #d9761f; }
.rb-fr-role--purple { background: #f2eefb; color: #7c4fd1; }

.rb-fr-row__desc {
    margin: 0;
    max-width: 620px;
    color: #526078;
    font-size: 14px;
    line-height: 1.5;
}

.rb-fr-row__stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid #eef1f6;
}

.rb-fr-row__stats div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rb-fr-row__stats i {
    flex: 0 0 auto;
    color: #2f6fd1;
    font-size: 13px;
}

.rb-fr-row__stats strong {
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
}

.rb-fr-row__stats span {
    color: #8896b3;
    font-size: 14px;
}

.rb-fr-row__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rb-fr-row__actions .btn {
    justify-content: center;
    padding: 9px 10px;
    font-size: 14px;
}

.rb-fr-row__message {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    border: 1px solid #dde4ee;
    border-radius: 8px;
    color: #33415f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.rb-fr-row__store {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #2f6fd1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.rb-fr-row__store i {
    font-size: 12px;
}

.rb-fr-row__book {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    border-radius: 8px;
    background: #eafaf1;
    color: #1f8a4c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

/* ---------------------------------------------------------
   PAGINATION
   --------------------------------------------------------- */

.rb-fr-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 26px;
}

.rb-fr-pagination__page,
.rb-fr-pagination__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid #dde4ee;
    border-radius: 8px;
    background: #fff;
    color: #33415f;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.rb-fr-pagination__page--active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.rb-fr-pagination__arrow:disabled {
    color: #c3cbdb;
    cursor: default;
}

.rb-fr-pagination__dots {
    color: #8896b3;
    font-size: 14px;
}

/* =========================================================
   CTA
   ========================================================= */

.rb-fr-cta__box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 34px 40px;
    border: 1px solid #dce5f0;
    border-radius: 15px;
    background: linear-gradient(90deg, #f2f7fd 0%, #f5f8fc 46%, #f3f7fc 100%);
}

.rb-fr-cta__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #eaf2fc;
    color: #2f6fd1;
    font-size: 24px;
}

.rb-fr-cta__content {
    flex: 1;
}

.rb-fr-cta__content h2 {
    margin: 0 0 6px;
    color: var(--color-primary);
    font-size: 26px;
    font-weight: 700;
}

.rb-fr-cta__content p {
    margin: 0;
    color: #526078;
    font-size: 16px;
}

.rb-fr-cta__box .btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

/* ---------------------------------------------------------
   RECAP STRIP
   --------------------------------------------------------- */

.rb-fr-recap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #eef1f6;
}

.rb-fr-recap__items {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.rb-fr-recap__item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rb-fr-recap__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 16px;
}

.rb-fr-recap__icon--blue { background: #eaf2fc; color: #2f6fd1; }
.rb-fr-recap__icon--green { background: #eafaf1; color: #2f9e58; }
.rb-fr-recap__icon--gold { background: #fdf6e0; color: #c99a10; }
.rb-fr-recap__icon--purple { background: #f2eefb; color: #7c4fd1; }

.rb-fr-recap__item h3 {
    margin: 0;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 700;
}

.rb-fr-recap__item p {
    margin: 0;
    color: #66738a;
    font-size: 14px;
}

.rb-fr-recap__tagline {
    margin: 0;
    color: var(--color-primary);
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
    font-style: italic;
    text-align: right;
}

.rb-fr-recap__tagline span {
    color: #c99a10;
    text-decoration: underline;
    text-decoration-style: wavy;
    text-underline-offset: 4px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
    .rb-fr-row {
        grid-template-columns: 64px 1fr;
    }

    .rb-fr-row__stats {
        grid-column: 2;
        flex-direction: row;
        gap: 24px;
        padding-left: 0;
        border-left: 0;
        margin-top: 10px;
    }

    .rb-fr-row__actions {
        grid-column: 1 / -1;
        flex-direction: row;
        margin-top: 6px;
    }

    .rb-fr-row__actions .btn,
    .rb-fr-row__message {
        flex: 1;
    }
}

@media (max-width: 900px) {
    .rb-fr-body__layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    /* Shrink the decorative orbit (labels overhang it by 30px) and move the
       tagline under it so nothing overlaps or runs off-screen. */
    .rb-fr-row {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .rb-fr-row__avatar {
        margin-bottom: 6px;
    }

    .rb-fr-content__top {
        flex-direction: column;
        align-items: flex-start;
    }

    .rb-fr-cta__box {
        flex-direction: column;
        text-align: center;
        padding: 28px 22px;
    }

    .rb-fr-recap {
        justify-content: center;
        text-align: center;
    }

    .rb-fr-recap__tagline {
        text-align: center;
    }
}

/* ---------------------------------------------------------
   LIVE DIRECTORY (inc/researchers.php)
   --------------------------------------------------------- */

/* Photo, or initials when the researcher hasn't added one. */
.rb-fr-row__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-decoration: none;
}

.rb-fr-row__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rb-fr-row__avatar--initials {
    background: linear-gradient(135deg, #0a1d4d, #2f6fd1);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.rb-fr-row__main h3 a {
    color: inherit;
    text-decoration: none;
}

.rb-fr-row__main h3 a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rb-fr-row__title {
    margin: 0 0 4px;
    color: #66738a;
    font-size: 14px;
}

.rb-fr-row__availability {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #eafaf1;
    color: #1f8a4c;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.rb-fr-row__availability i {
    font-size: 8px;
}

.rb-fr-row__availability--appointment {
    background: #fdf1e4;
    color: #b8621a;
}

.rb-fr-row__availability--appointment i {
    font-size: 12px;
}

/* Research Field: options matching the field search box. */
.rb-fr-check.rb-fr-hidden.is-shown {
    display: flex;
}

.rb-fr-list__footer {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.rb-fr-list.is-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

/* ---------------------------------------------------------
   LIST VIEW: tidy right side (stats + equal-width buttons)
   --------------------------------------------------------- */

.rb-fr-list:not(.is-grid) .rb-fr-row {
    grid-template-columns: 72px minmax(0, 1fr) 190px 180px;
    align-items: center;
}

.rb-fr-list:not(.is-grid) .rb-fr-row__avatar {
    align-self: start;
}

/* Stats: one line each, numbers lined up. */
.rb-fr-list:not(.is-grid) .rb-fr-row__stats {
    gap: 12px;
    padding: 4px 0 4px 22px;
}

.rb-fr-list:not(.is-grid) .rb-fr-row__stats div {
    display: grid;
    grid-template-columns: 16px 26px 1fr;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.rb-fr-list:not(.is-grid) .rb-fr-row__stats strong {
    text-align: right;
}

/* Buttons: same width and height; store link on one line under them. */
.rb-fr-list:not(.is-grid) .rb-fr-row__actions {
    gap: 8px;
}

.rb-fr-list:not(.is-grid) .rb-fr-row__actions .btn,
.rb-fr-list:not(.is-grid) .rb-fr-row__message {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.rb-fr-list:not(.is-grid) .rb-fr-row__message {
    transition: border-color 0.2s, color 0.2s;
}

.rb-fr-list:not(.is-grid) .rb-fr-row__message:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.rb-fr-list:not(.is-grid) .rb-fr-row__store {
    margin-top: 2px;
    white-space: nowrap;
    font-size: 13px;
}

.rb-fr-list:not(.is-grid) .rb-fr-row__store:hover i {
    transform: translateX(3px);
}

/* Narrower screens: stats in a row under the details, buttons side by side. */
@media (max-width: 1200px) {
    .rb-fr-list:not(.is-grid) .rb-fr-row {
        grid-template-columns: 64px minmax(0, 1fr);
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__stats {
        grid-column: 2;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 24px;
        padding: 12px 0 0;
        border-left: 0;
        border-top: 1px solid #eef1f6;
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__stats div {
        display: flex;
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__actions {
        display: grid;
        grid-column: 2;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        align-items: center;
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__store {
        margin: 0 0 0 8px;
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__availability {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .rb-fr-list:not(.is-grid) .rb-fr-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__stats,
    .rb-fr-list:not(.is-grid) .rb-fr-row__actions {
        grid-column: 1;
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rb-fr-list:not(.is-grid) .rb-fr-row__store {
        grid-column: 1 / -1;
        margin: 4px 0 0;
    }
}

/* ---------------------------------------------------------
   GRID VIEW (default): profile cards
   4 per row on large screens, 3 on laptops, 2 on tablets and
   small laptops, 1 on phones.
   --------------------------------------------------------- */

.rb-fr-list.is-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.rb-fr-list.is-grid .rb-fr-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0 0 18px;
    overflow: hidden;
    border-radius: 16px;
    text-align: center;
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.rb-fr-list.is-grid .rb-fr-row:hover {
    border-color: #d3deee;
    box-shadow: 0 14px 30px rgba(10, 29, 77, 0.1);
    transform: translateY(-4px);
}

/* Cover band behind the photo. */
.rb-fr-list.is-grid .rb-fr-row::before {
    content: "";
    align-self: stretch;
    height: 70px;
    background:
        radial-gradient(circle at 85% 20%, rgba(255, 196, 0, 0.35) 0, rgba(255, 196, 0, 0) 45%),
        linear-gradient(135deg, #06122f 0%, #0f2a6b 60%, #2f6fd1 100%);
}

.rb-fr-list.is-grid .rb-fr-row__avatar {
    flex: 0 0 auto;
    width: 88px;
    height: 88px;
    margin: -44px 0 0;
    border: 4px solid #fff;
    box-shadow: 0 8px 18px rgba(10, 29, 77, 0.18);
    background-color: #fff;
}

.rb-fr-list.is-grid .rb-fr-row__avatar--initials {
    font-size: 26px;
}

.rb-fr-list.is-grid .rb-fr-row__main {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 12px 18px 0;
}

.rb-fr-list.is-grid .rb-fr-row__main h3 {
    justify-content: center;
    margin-bottom: 2px;
    font-size: 17px;
    line-height: 1.3;
}

.rb-fr-list.is-grid .rb-fr-row__title {
    margin-bottom: 2px;
    font-size: 13px;
}

.rb-fr-list.is-grid .rb-fr-row__affiliation {
    margin-bottom: 8px;
    color: #66738a;
    font-size: 13px;
}

.rb-fr-list.is-grid .rb-fr-row__affiliation::before {
    content: "\f3c5"; /* location pin */
    margin-right: 5px;
    color: #2f6fd1;
    font-family: "Font Awesome 6 Free";
    font-size: 11px;
    font-weight: 900;
}

/* Expertise as small chips, two lines at most. */
.rb-fr-list.is-grid .rb-fr-row__fields {
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: 10px;
    color: #33415f;
    font-size: 12.5px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rb-fr-list.is-grid .rb-fr-row__roles {
    justify-content: center;
    margin-bottom: 10px;
}

.rb-fr-list.is-grid .rb-fr-row__desc {
    display: -webkit-box;
    overflow: hidden;
    color: #66738a;
    font-size: 13px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Stats: three equal columns, number over label. */
.rb-fr-list.is-grid .rb-fr-row__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    width: calc(100% - 36px);
    margin: 16px 18px 0;
    padding: 12px 0;
    border: 0;
    border-radius: 12px;
    background: #f5f8fc;
}

.rb-fr-list.is-grid .rb-fr-row__stats div {
    flex-direction: column;
    gap: 2px;
    padding: 0 4px;
}

.rb-fr-list.is-grid .rb-fr-row__stats div + div {
    border-left: 1px solid #e3e9f2;
}

.rb-fr-list.is-grid .rb-fr-row__stats i {
    display: none;
}

.rb-fr-list.is-grid .rb-fr-row__stats strong {
    font-size: 18px;
    line-height: 1.2;
}

.rb-fr-list.is-grid .rb-fr-row__stats span {
    font-size: 11.5px;
    line-height: 1.25;
}

/* Buttons: View Profile + Message side by side, store link under them. */
.rb-fr-list.is-grid .rb-fr-row__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: calc(100% - 36px);
    margin: 14px 18px 0;
}

.rb-fr-list.is-grid .rb-fr-row__actions .btn,
.rb-fr-list.is-grid .rb-fr-row__message {
    height: 40px;
    padding: 0 10px;
}

/* No Message button (no store yet): View Profile takes the full width. */
.rb-fr-list.is-grid .rb-fr-row__actions .btn:not(:has(+ .rb-fr-row__message)),
.rb-fr-list.is-grid .rb-fr-row__store,
.rb-fr-list.is-grid .rb-fr-row__availability {
    grid-column: 1 / -1;
}

.rb-fr-list.is-grid .rb-fr-row__message {
    transition: border-color 0.2s, color 0.2s;
}

.rb-fr-list.is-grid .rb-fr-row__message:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.rb-fr-list.is-grid .rb-fr-row__store {
    padding-top: 2px;
    font-size: 13px;
}

.rb-fr-list.is-grid .rb-fr-row__store:hover i {
    transform: translateX(3px);
}

.rb-fr-row__store i {
    transition: transform 0.2s;
}

.rb-fr-list.is-grid .rb-fr-list__footer {
    grid-column: 1 / -1;
}

/* Large laptops: 3 per row. */
@media (max-width: 1599px) {
    .rb-fr-list.is-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Small laptops / tablets (sidebar still visible above 900px): 2 per row. */
@media (max-width: 1279px) {
    .rb-fr-list.is-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .rb-fr-row__actions {
        flex-wrap: wrap;
    }
}

/* Phones: one card per row. */
@media (max-width: 560px) {
    .rb-fr-list.is-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------------------------------------------------------
   CONSULTANT CARD
   --------------------------------------------------------- */

.rb-fr-row__consult {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 0 0 6px;
    color: #33415f;
    font-size: 13px;
    line-height: 1.45;
}

.rb-fr-row__consult i {
    flex: 0 0 auto;
    color: #2f6fd1;
    font-size: 12px;
}
