/* home.css */

/* FEED HEADER */
.feed-header {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-default);
    padding: 19px 25px 14px;
}

/* PROFILE AVATAR */
#profileAvatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-search);
    border: none;
    object-fit: cover;
    margin-right: 12px;
    cursor: pointer;
}

/* FEED HEADER BUTTONS */
.feed-header__new {
    flex: 1;
    background: none;
    border: none;
    padding: 7px 12px;
    color: var(--text-placeholder);
    font-size: 16px;
    text-align: left;
    cursor: text;
    transform: none !important;
}

.feed-header__post {
    background: var(--btn-bg);
    border: 1px solid var(--btn-border);
    border-radius: 8px;
    padding: 9px 16px 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transform: none !important;
}

/* FOLLOWING WRAPPER */
.following-wrapper {
    width: 100%;
    height: max-content;
    padding: 7px 0;
}

.suggested-wrapper {
    width: 100%;
    height: max-content;
    padding: 0px 0px 10px 0px;
    border-bottom: 1px solid var(--border-default);
}

/* FOLLOWING-LIST CAROUSEL */
.following-list {
    display: flex;
    align-items: center;
    padding: 7px 0;
    overflow: hidden;
}

.following-list__arrow {
    background: var(--bg-surface);
    border: none;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 99px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 4px 0 var(--shadow-default);
    transition: box-shadow 0.2s ease, transform 0.1s ease;
}

.following-list__arrow.prev {
    position: absolute;
    left: 7px;
    margin-top: 3px;
}

.following-list__arrow.next {
    position: absolute;
    right: 7px;
    margin-top: 3px;
}

button.following-list__arrow:hover {
    box-shadow: 0 0 7px 0 var(--shadow-default);
}

/* LIST ITEMS */
.following-list__items {
    flex: 1;
    display: flex;
    overflow-x: auto;
    gap: 17px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.following-list__item {
    scroll-snap-align: start;
    text-align: center;
    width: max-content;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
}

.following-list__item img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid var(--logo-color);
    object-fit: cover;
    padding: 2px;
}

.following-list__item .username {
    display: inline-block;
    width: 58px;
    margin-top: 1px;
    font-size: 11px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* front-of-8 & last-child padding */
.following-list__item:nth-child(8n+1) {
    padding-left: 22px;
}

.following-list__item:last-child {
    padding-right: 22px;
}

.following-list.ended .following-list__item:nth-child(8n+1) {
    padding-left: 0;
}

.following-list.ended .following-list__item:nth-last-child(8n) {
    padding-left: 22px;
}

/* Arrow icons inside buttons */
button.following-list__arrow > i {
    margin-top: 2px;
}

/* Hide arrows at start/finish */
section.following-list.start > .following-list__arrow.prev {
    display: none;
}

section.following-list.finish > .following-list__arrow.next {
    display: none;
}

/* Suggested carousel container */
.suggested-list {
    display: flex;
    align-items: flex-start;
    overflow-x: scroll;
    padding: 12px 19px;
    border-radius: 29px;
    scrollbar-width: thin; /* show in Firefox */
    scrollbar-gutter: stable;
}

/* WebKit scrollbar styling */
.suggested-list::-webkit-scrollbar {
    height: 8px;
}
.suggested-list::-webkit-scrollbar-track {
    background: transparent;
}
.suggested-list::-webkit-scrollbar-thumb {
    background-color: var(--border-default);
    border-radius: 4px;
}

/* Inner items wrapper */
.suggested-list__items {
    display: flex;
    gap: 17px;
    scroll-snap-type: x mandatory;
}
.suggested-list__items > * {
    scroll-snap-align: start;
}

/* Card */
.suggested__item {
    flex: 0 0 auto;
    background: var(--bg-page);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* box-shadow: 0 0px 10px rgb(0 0 0 / 6%); */
    height: max-content;
    width: 150px;
    justify-content: space-between;
    border: 1px solid var(--sidebar-border);
}

/* Avatar */
.suggested__avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    /* border: 1px solid var(--border-default); */
    margin-bottom: 5px;
    background: var(--bg-surface);
}

/* Username */
.suggested__username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 4px;
    line-height: 1.2;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-decoration: none;
}

.suggested__meta {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 12px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Follow button */
.suggested__follow-btn,button.suggested__follow-btn.following:hover {
    width: 100%;
    background: var(--text-primary);
    border: 1px solid var(--text-primary);
    border-radius: 8px;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--bg-surface);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.suggested__follow-btn:hover,button.suggested__follow-btn.following {
    background: var(--btn-bg-hover);
    color: var(--text-primary);
}

.suggested__info {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

button.following-list__arrow:active {
    transform: scale(0.9);
}

.profile-link {
    width: 40px;
    height: 40px;
}

span.suggested-title {
    margin-left: 19px;
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}