/* Prev/Next navigation bar shown at the top of profile pages when the
   visitor arrived via a search/random/find-matches list. */
.profile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
    margin: 10px 0 14px;
    background: #fff;
    border: 1px solid #ebe1e0;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.3;
}
.profile-nav-bar .pn-arrow {
    color: #B72828;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 24px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 38%;
}
.profile-nav-bar .pn-arrow:hover { background: #fff3f1; }
.profile-nav-bar .pn-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f4ebe9;
    border: 1px solid #ebe1e0;
    flex: 0 0 auto;
}
.profile-nav-bar .pn-avatar-empty { background: #f4ebe9; }
.profile-nav-bar .pn-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
}
.profile-nav-bar .pn-prev .pn-meta { text-align: right; }
.profile-nav-bar .pn-next .pn-meta { text-align: left; }
.profile-nav-bar .pn-name {
    color: #222;
    font-weight: 700;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-nav-bar .pn-loc {
    color: #888;
    font-weight: 400;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-nav-bar .pn-caret {
    font-size: 40px;
    line-height: 1;
    letter-spacing: -4px;
    flex: 0 0 auto;
}
.profile-nav-bar .pn-prev .pn-caret { margin-right: 4px; }
.profile-nav-bar .pn-next .pn-caret { margin-left: 4px; }
.profile-nav-bar .pn-disabled {
    color: #d8cfce;
    cursor: default;
}
.profile-nav-bar .pn-disabled:hover { background: transparent; }

/* Hide/show thumbnails toggle (sits in the centered status block). */
.profile-nav-bar .pn-toggle {
    background: transparent;
    border: 1px solid #ebe1e0;
    color: #777;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    line-height: 1.4;
    cursor: pointer;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
    transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.profile-nav-bar .pn-toggle:hover {
    border-color: #B72828;
    color: #B72828;
    background: #fff3f1;
}
.profile-nav-bar .pn-toggle-icon { font-size: 9px; line-height: 1; }
.profile-nav-bar .pn-center {
    color: #555;
    flex: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-nav-bar .pn-back {
    color: #888;
    text-decoration: none;
}
.profile-nav-bar .pn-back:hover { color: #B72828; text-decoration: underline; }
.profile-nav-bar .pn-pos {
    color: #999;
    font-size: 12px;
    margin-left: 6px;
}

/* Visited-card highlight on list pages: cards whose profile has already
   been opened in this browser session get a clearly visible but tasteful
   "viewed" treatment. We target the card itself (not just an inner
   wrapper) so the cue is visible regardless of the wrapper's structure. */
.random_user_item.pn-visited {
    position: relative;
}
.random_user_item.pn-visited .to_small_usr,
.random_user_item.pn-visited > a,
.random_user_item.pn-visited > div {
    border-radius: 12px;
}
.random_user_item.pn-visited::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 2px solid #B72828;
    border-radius: 12px;
    pointer-events: none;
    box-shadow: 0 0 0 3px rgba(183, 40, 40, 0.12);
    z-index: 4;
}
.random_user_item.pn-visited::after {
    content: '\2713\00a0Viewed';
    position: absolute;
    top: 10px;
    right: 60px;
    padding: 3px 9px 3px 8px;
    background: #B72828;
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1;
    z-index: 5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    pointer-events: none;
}
.random_user_item.pn-visited .card-image img {
    opacity: 0.82;
    transition: opacity .15s ease;
}
.random_user_item.pn-visited:hover .card-image img { opacity: 1; }

/* Brief pulse on the card the user came from, after clicking
   "Back to results", so they can re-orient at a glance. */
@keyframes pn-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(183, 40, 40, 0.55); }
    60%  { box-shadow: 0 0 0 14px rgba(183, 40, 40, 0); }
    100% { box-shadow: 0 0 0 0 rgba(183, 40, 40, 0); }
}
.random_user_item.pn-return-pulse {
    animation: pn-pulse 1.2s ease-out 2;
    border-radius: 12px;
}

/* Horizontal thumbnail strip of every member in the traversal set,
   shown below the prev/next bar so the visitor can jump directly to
   any other result without paging through one at a time. */
.profile-nav-thumbs {
    margin: -6px 0 14px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #ebe1e0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    max-height: 70px;
    transition: max-height .22s ease, padding .22s ease, margin .22s ease, opacity .22s ease;
}
.profile-nav-thumbs.pn-thumbs-collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-bottom-width: 0;
    margin-bottom: 14px;
    opacity: 0;
    pointer-events: none;
}
.profile-nav-thumbs .pn-thumbs-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 5px 4px 9px;
}
.profile-nav-thumbs .pn-thumbs-track::-webkit-scrollbar { height: 6px; }
.profile-nav-thumbs .pn-thumbs-track::-webkit-scrollbar-thumb {
    background: #ebe1e0;
    border-radius: 3px;
}
.profile-nav-thumbs .pn-thumb {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f4ebe9;
    border: 2px solid transparent;
    display: inline-block;
    position: relative;
    transition: transform .12s ease, border-color .12s ease, opacity .12s ease;
}
.profile-nav-thumbs .pn-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.profile-nav-thumbs .pn-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #B72828;
    font-weight: 700;
    font-size: 14px;
    border-radius: 50%;
}
.profile-nav-thumbs .pn-thumb:hover {
    transform: translateY(-1px);
    border-color: #ebe1e0;
}
.profile-nav-thumbs .pn-thumb-current {
    width: 44px;
    height: 44px;
    border-color: #B72828;
    box-shadow: 0 0 0 2px rgba(183, 40, 40, 0.18);
    transform: translateY(-2px);
}
.profile-nav-thumbs .pn-thumb-visited { opacity: 0.55; }
.profile-nav-thumbs .pn-thumb-visited::after {
    content: '\2713';
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    line-height: 14px;
    text-align: center;
    background: #B72828;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 2;
    pointer-events: none;
}
.profile-nav-thumbs .pn-thumb-visited:hover { opacity: 1; }

/* When the thumbs strip is rendered, drop the rounded bottom on the
   prev/next bar so the two read as one bonded unit. */
#profile-nav-arrows:has(.profile-nav-thumbs) .profile-nav-bar {
    margin-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: #f4ebe9;
}

@media (max-width: 600px) {
    .profile-nav-bar { flex-wrap: wrap; gap: 6px; padding: 6px 10px; font-size: 13px; }
    .profile-nav-bar .pn-arrow { padding: 4px 8px; }
    .profile-nav-bar .pn-center { order: 3; flex-basis: 100%; text-align: center; }
    .profile-nav-thumbs .pn-thumb { width: 32px; height: 32px; }
    .profile-nav-thumbs .pn-thumb-current { width: 38px; height: 38px; }
    .profile-nav-bar .pn-arrow { max-width: 44%; gap: 6px; }
    .profile-nav-bar .pn-name { font-size: 14px; }
    .profile-nav-bar .pn-loc { font-size: 11px; }
    .profile-nav-bar .pn-avatar { width: 32px; height: 32px; }
    .profile-nav-bar .pn-caret { font-size: 30px; letter-spacing: -3px; }
    .profile-nav-bar .pn-toggle-label { display: none; }
}
