/* ======================================
   Social Discovery & Interest Signals
   ====================================== */

/* --- Interest signals strip (events, places, socials detail pages) --- */
.interest-signals-strip,
.social-signals-strip {
    background: #f8f7f5;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 0;
    display: flex;
    align-items: center;
}
.interest-signals-inner,
.social-signals-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}
.interest-signals-inner > i,
.social-signals-inner > i {
    font-size: 16px;
    color: #8c7e6a;
    flex-shrink: 0;
}
.interest-friends-avatars,
.social-signals-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.interest-friend-avatar,
.social-signal-avatar,
.social-signal-avatar > a {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: -6px;
    border: 2px solid #fff;
    position: relative;
    text-decoration: none;
}
.interest-friend-avatar img,
.social-signal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.interest-friend-avatar .avatar-default,
.social-signal-avatar .avatar-default {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #d4c5a9;
    border-radius: 50%;
}
.interest-friend-avatar .avatar-default .icon-avatar,
.social-signal-avatar .avatar-default .icon-avatar {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
}
.interest-text,
.social-signals-text {
    font-size: 13px;
    color: #6b6157;
    line-height: 1.4;
}
.social-signal-avatar.is-discoverable { position: relative; }
.social-signal-avatar.is-discoverable .add-friend-mini {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #8c7e6a;
    color: #fff;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 8px;
    transition: background 0.2s;
    z-index: 2;
}
.social-signal-avatar.is-discoverable .add-friend-mini:hover { background: #6b5d4a; }

/* --- Discoverability radio group (account settings page) --- */
.discoverability-setting { margin: 20px 0; }
.discoverability-setting .radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}
.discoverability-setting .radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}
.discoverability-setting .radio-option input[type="radio"] {
    margin-top: 3px;
    accent-color: #8c7e6a;
}
.discoverability-setting .radio-option .radio-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.discoverability-setting .radio-option .radio-description {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}


/* ======================================================
   Friends Page — #account-friends-page
   ====================================================== */

/* Override the section max-width/margin for this page */
#account-friends-page .account-friends-section {
    margin-top: 0;
    padding-top: 32px;
}

/* --- Page header --- */
#account-friends-page .friends-page-header {
    margin-bottom: 28px;
    padding: 0;
}
#account-friends-page .friends-page-header h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #3a3530;
    line-height: 1.2;
    margin: 0;
}
#account-friends-page .friends-page-header p {
    font-size: 0.93rem;
    color: #a89e8e;
    margin-top: 4px;
}

/* --- Two-column grid --- */
#account-friends-page .friends-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    min-height: calc(100vh - 220px);
}

/* --- LEFT: Connections panel --- */
#account-friends-page .connections-panel {
    border-right: 1px solid #e8e2d9;
    padding-right: 28px;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e8e2d9 transparent;
}
#account-friends-page .connections-panel::-webkit-scrollbar { width: 4px; }
#account-friends-page .connections-panel::-webkit-scrollbar-thumb { background: #e8e2d9; border-radius: 4px; }

#account-friends-page .panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
#account-friends-page .panel-title h2 {
    font-size: 1rem;
    font-weight: 800;
    color: #3a3530;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    border: none;
    padding: 0;
}

.count-badge {
    background: #91cbc0;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    min-width: 22px;
    text-align: center;
}

.btn-new-connection {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #91cbc0;
    color: #fff;
    padding: 7px 16px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-new-connection:hover {
    background: #6db3a6;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

/* Friend request banner */
.request-banner {
    background: linear-gradient(135deg, #d4efea, #e8f6f3);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: box-shadow 0.2s;
}
.request-banner:hover { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.request-banner .req-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #91cbc0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.request-banner .req-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: #6b6157;
}
.request-banner .req-text span { color: #6db3a6; }

/* Override existing friend list styling within this page */
#account-friends-page #friends-list { display: flex; flex-direction: column; gap: 2px; }
#account-friends-page #friends-list .friend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.15s;
    border-bottom: none;
    position: relative;
}
#account-friends-page #friends-list .friend-item:hover { background: #f3f0eb; }

#account-friends-page #friends-list .friend-item .item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
#account-friends-page #friends-list .friend-item .avatar,
#account-friends-page #friends-list .friend-item .item-content > span.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}
#account-friends-page #friends-list .friend-item .avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
#account-friends-page #friends-list .friend-item .avatar .avatar-default {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #c9c0b3;
    display: flex;
    align-items: center;
    justify-content: center;
}
#account-friends-page #friends-list .friend-item .avatar .avatar-default .icon-avatar {
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
}
#account-friends-page #friends-list .friend-item .user-name {
    font-size: 0.87rem;
    font-weight: 700;
    color: #3a3530;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#account-friends-page #friends-list .friend-item .tagline {
    font-size: 0.75rem;
    color: #a89e8e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#account-friends-page #friends-list .friend-item .remove-friend {
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 0.85rem;
    color: #c9c0b3;
}
#account-friends-page #friends-list .friend-item:hover .remove-friend { opacity: 1; }
#account-friends-page #friends-list .friend-item .remove-friend:hover { color: #e07a6a; }

/* Accept/decline buttons in friend list */
#account-friends-page #friends-list .friend-item .buttons .button.accept-button {
    padding: 4px 12px;
    border-radius: 100px;
    background: #91cbc0;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}
#account-friends-page #friends-list .friend-item .buttons .button.accept-button:hover { background: #6db3a6; }
#account-friends-page #friends-list .friend-item .buttons .button.decline-button {
    padding: 4px 10px;
    border-radius: 100px;
    background: transparent;
    color: #a89e8e;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid #e8e2d9;
}
#account-friends-page #friends-list .friend-item .buttons .button.decline-button:hover {
    background: #f3f0eb;
    color: #6b6157;
}

/* Pending badge */
#account-friends-page #friends-list .friend-item .tagline.badge {
    font-size: 0.68rem;
    color: #a89e8e;
    font-style: italic;
    background: none;
    padding: 0;
}


/* --- RIGHT: Discover panel --- */
#account-friends-page .discover-panel {
    padding-left: 36px;
}
#account-friends-page .discover-header {
    margin-bottom: 20px;
}
#account-friends-page .discover-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #3a3530;
    margin: 0;
    border: none;
    padding: 0;
}
#account-friends-page .discover-header p {
    font-size: 0.82rem;
    color: #a89e8e;
    margin-top: 2px;
}


/* --- Discovery cards --- */
.discovery-feed { display: flex; flex-direction: column; gap: 6px; }

.disc-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid transparent;
    transition: all 0.2s;
    position: relative;
    animation: disc-fadeUp 0.35s ease-out both;
}
.disc-card:hover {
    border-color: #e8e2d9;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

/* Stagger animation */
@keyframes disc-fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.disc-card:nth-child(1) { animation-delay: 0s; }
.disc-card:nth-child(2) { animation-delay: 0.05s; }
.disc-card:nth-child(3) { animation-delay: 0.1s; }
.disc-card:nth-child(4) { animation-delay: 0.15s; }
.disc-card:nth-child(5) { animation-delay: 0.2s; }
.disc-card:nth-child(6) { animation-delay: 0.25s; }
.disc-card:nth-child(7) { animation-delay: 0.3s; }
.disc-card:nth-child(8) { animation-delay: 0.35s; }

/* Avatar */
.disc-avatar {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    display: block;
    text-decoration: none;
}
.disc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.d-initial {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #c9c0b3, #a89e8e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    border-radius: 50%;
}

/* Body */
.disc-body { flex: 1; min-width: 0; }
.disc-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}
.disc-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #3a3530;
    text-decoration: none;
    line-height: 1.3;
    display: block;
}
.disc-name:hover { color: #6db3a6; }
.disc-tagline {
    font-size: 0.78rem;
    color: #a89e8e;
    margin-top: 1px;
}

/* ── Reason pills ── */
.disc-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.reason-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    line-height: 1.2;
}
.reason-pill.reason-social { background: #fef3e5; color: #c4882e; }
.reason-pill.reason-social i { color: #d9a54a; }
.reason-pill.reason-pin { background: #eef6f4; color: #4d9488; }
.reason-pill.reason-pin i { color: #91cbc0; }
.reason-pill.reason-mutual { background: #f0ebf5; color: #7e6b9a; }
.reason-pill.reason-mutual i { color: #a08cbe; }
.reason-pill.reason-interest { background: #f3f0eb; color: #8c7e6a; }
.reason-pill.reason-interest i { color: #a89e8e; }

/* ── Shared thumbnails ── */
.disc-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.disc-thumb {
    position: relative;
    flex-shrink: 0;
    width: 86px;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}
.disc-thumb:hover { transform: translateY(-2px); }
.disc-thumb img {
    width: 86px;
    height: 56px;
    object-fit: cover;
    display: block;
}
.disc-thumb .fallback-thumb {
    width: 86px;
    height: 56px;
    object-fit: contain;
    background: #f3f0eb;
}
.disc-thumb .thumb-placeholder {
    width: 86px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f0eb;
    color: #ccc;
    font-size: 18px;
}
.disc-thumb-type {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.03em;
}
.disc-thumb-label {
    display: block;
    font-size: 0.65rem;
    color: #8c7e6a;
    padding: 3px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* ── Mutual friend avatars ── */
.disc-mutuals { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.mutual-stack { display: flex; }
.m-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-right: -5px;
    overflow: hidden;
    flex-shrink: 0;
    display: inline-block;
}
.m-av img { width: 100%; height: 100%; object-fit: cover; }
.m-init {
    width: 100%;
    height: 100%;
    background: #c9c0b3;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
}
.mutual-label { font-size: 0.7rem; color: #a89e8e; }

/* ── Actions ── */
.disc-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-connect {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 100px;
    background: #91cbc0;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
}
.btn-connect:hover {
    background: #6db3a6;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(109, 179, 166, 0.35);
}
.btn-connect i { font-size: 0.75rem; }
.btn-dismiss {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    color: #e8e2d9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}
.btn-dismiss:hover { background: #f3f0eb; color: #8c7e6a; }

/* ── Empty state ── */
.discover-empty {
    text-align: center;
    padding: 60px 20px;
}
.discover-empty i {
    font-size: 2.5rem;
    color: #c9c0b3;
    margin-bottom: 16px;
    display: block;
}
.discover-empty p {
    font-size: 0.9rem;
    color: #a89e8e;
    max-width: 300px;
    margin: 0 auto;
    line-height: 1.5;
}
.discover-empty .empty-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}
.discover-empty .empty-links a {
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
}


/* ── Responsive ── */
@media (max-width: 960px) {
    #account-friends-page .friends-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    #account-friends-page .connections-panel {
        position: static;
        max-height: none;
        overflow: visible;
        border-right: none;
        border-bottom: 1px solid #e8e2d9;
        padding-right: 0;
        padding-bottom: 24px;
        margin-bottom: 24px;
    }
    #account-friends-page .discover-panel {
        padding-left: 0;
    }
}
@media (max-width: 768px) {
    .interest-signals-strip,
    .social-signals-strip {
        padding: 10px 12px;
    }
    .interest-friend-avatar,
    .social-signal-avatar,
    .social-signal-avatar > a {
        width: 26px;
        height: 26px;
    }
    .interest-text,
    .social-signals-text {
        font-size: 12px;
    }
}
@media (max-width: 600px) {
    #account-friends-page .friends-page-header h1 { font-size: 1.4rem; }
    .disc-card { padding: 12px; gap: 10px; }
    .disc-avatar { width: 42px; height: 42px; }
    .disc-top { flex-wrap: wrap; }
    .btn-connect span { display: none; }
    .btn-connect { padding: 8px 12px; border-radius: 50%; }
    .disc-thumb { width: 68px; }
    .disc-thumb img,
    .disc-thumb .thumb-placeholder { width: 68px; height: 44px; }
}
