/* css/connections.css */

.connections-container {
    padding-top: 80px; /* Account for navbar */
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 80px; /* Mobile bottom nav padding */
}

/* Header */
.conn-header {
    padding: 20px 20px 10px;
}

.conn-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 5px 0;
    color: #fff;
}

.conn-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    margin: 0;
}

/* Sticky Search & Tabs */
.conn-sticky-top {
    position: sticky;
    top: 60px; /* Below navbar */
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
    padding: 15px 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Search Box */
.conn-search-wrap {
    position: relative;
    margin-bottom: 15px;
}

.conn-search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
}

.conn-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 14px 12px 40px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.conn-search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

/* Tabs */
.conn-tabs {
    display: flex;
    gap: 30px;
}

.conn-tab {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.conn-tab.active {
    color: #fff;
}

.conn-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.2s;
    transform-origin: center;
}

.conn-tab.active::after {
    transform: scaleX(1);
}

.conn-tab-count {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.conn-tab.active .conn-tab-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* List Content */
.conn-list-container {
    padding: 0;
}

.conn-list {
    display: none;
    flex-direction: column;
}

.conn-list.active {
    display: flex;
}

/* List Item */
.conn-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.conn-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.conn-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #222;
    margin-right: 15px;
    flex-shrink: 0;
}

.conn-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.conn-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.conn-meta-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
}

.conn-username {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conn-mutual {
    font-size: 0.75rem;
    color: #10b981; /* green-500 */
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.conn-meta-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

/* Action Button */
.conn-action {
    margin-left: 15px;
}

.conn-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
    text-align: center;
}

.conn-btn.following {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

.conn-btn.following:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.conn-btn.follow {
    background: #fff;
    color: #000;
}

.conn-btn.follow:hover {
    background: #e5e5e5;
}

.conn-btn.follow-back {
    background: #d8b4fe; /* Purple tone to stand out */
    color: #000;
}

.conn-btn.follow-back:hover {
    background: #c084fc;
}

.conn-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Empty States */
.conn-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.conn-empty-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.conn-empty h3 {
    font-size: 1.3rem;
    color: #fff;
    margin: 0 0 10px 0;
}

.conn-empty p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin: 0 0 25px 0;
    max-width: 280px;
}

.conn-empty .btn-primary {
    padding: 10px 24px;
    border-radius: 24px;
}

/* Loading States */
.conn-loading {
    display: flex;
    justify-content: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
}

/* Skeleton */
.conn-skeleton {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.conn-skel-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    margin-right: 15px;
}

.conn-skel-info {
    flex: 1;
}

.conn-skel-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 8px;
}

.conn-skel-line.short {
    width: 40%;
    margin-bottom: 0;
}

.conn-skel-btn {
    width: 90px;
    height: 32px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    margin-left: 15px;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .conn-header {
        padding: 15px 15px 5px;
    }
    .conn-sticky-top {
        padding: 10px 15px 0;
        top: 50px;
    }
    .conn-item {
        padding: 12px 15px;
    }
}
