/* ==========================================================================
   User Cards - Premium Modern UI
   Inspired by Dribbble & Figma Trends
   ========================================================================== */

:root {
    --card-bg: #FFFFFF;
    --text-main: #111111;
    --text-muted: #8B8B8B;
    --light-bg: #F5F6FA;
    --accent-blue: #6FA8FF;
    --accent-purple: #8B5CF6;
    --status-green: #7ED957;
    --border-light: #eef2f7;
}

/* --- Filter Section --- */
.designer-filters-section {
    display: contents; /* Allow sticky child to reference outer scroll container */
}

.designer-tabs-sticky-container {
    position: sticky;
    top: 4.5rem;
    z-index: 100;
    background: #f4f7f9;
    padding: 12px 0;
    margin-top: 10px;
    margin-bottom: 24px;
}

.figmaas-search-container {
    background: #fff;
    border: 1px solid #DCE0DB;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 6px 0 24px !important;
    box-shadow: rgba(0, 0, 0, 0.02) 0px 1px 3px;
    overflow: visible;
}

.figmaas-search-container:focus-within {
    border-color: #c253f9 !important;
    box-shadow: 0 0 0 3px rgba(194, 83, 249, 0.1);
}

.search-row-main {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    gap: 16px;
}

.filter-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-icon {
    font-size: 20px;
    color: #8B5CF6;
}

.dropdown-toggle-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: 140px;
    font-size: 14px;
    color: var(--text-main);
    padding: 8px 0;
    user-select: none;
}

.dropdown-toggle-v2 .selected-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-toggle-v2 i {
    font-size: 18px;
    color: var(--text-muted);
}

.radius-12 {
    border-radius: 12px !important;
}

.hover-bg-pink-light:hover {
    background-color: rgba(194, 83, 249, 0.05) !important;
}

.hover-text-pink:hover {
    color: #C253F9 !important;
}

.dropdown-item.active {
    background-color: rgba(194, 83, 249, 0.1) !important;
    color: #C253F9 !important;
    font-weight: 600;
}

.filter-input-group input {
    border: none !important;
    outline: none !important;
    font-size: 15px;
    color: var(--text-main);
    background: transparent;
    width: 100%;
}

.filter-divider {
    width: 1px;
    height: 24px; /* Reduced divider height */
    background-color: var(--border-light);
}

.btn-search-premium {
    /* background: linear-gradient(135deg, #c253f9 0%, #a641d4 100%) !important; */
    background-color: #0d0d0d;
    color: #fff;
    border: none;
    padding: 0 32px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 38px;
}

.btn-search-premium:hover {
    /* background: #7c4dff; */
    transform: scale(0.98);
}

/* Dropdown Menu Scroll Styling */
.figmaas-search-container .dropdown-menu {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 #f5f5f5;
    z-index: 990;
}

.figmaas-search-container .dropdown-menu::-webkit-scrollbar {
    width: 6px;
    display: block !important;
}

.figmaas-search-container .dropdown-menu::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.figmaas-search-container .dropdown-menu::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

/* Tabs */
.filter-tabs {
    display: flex;
    gap: 12px;
}

.filter-tab-btn {
    padding: 0 20px;
    height: 38px; /* Matched to Explore page */
    border-radius: 9999px; /* Pill shape */
    border: 1px solid var(--border-light);
    background: #fff;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px; /* Matched to Explore page */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-tab-btn.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* View Toggle */
.view-toggle-group {
    display: flex;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 25px;
    padding: 4px;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: #f1f5f9;
    color: #111;
}

.view-btn iconify-icon {
    font-size: 18px;
}

/* Responsive Overrides */
@media (max-width: 991px) {
    .search-filter-bar {
        border-radius: 20px;
        padding: 16px;
    }
    .filter-divider {
        display: none;
    }
    .filter-input-group {
        width: 100%;
        padding: 8px 0;
        border-bottom: 1px solid var(--border-light);
    }
    .btn-search-premium {
        width: 100%;
        margin-top: 8px;
    }
}

@media (max-width: 576px) {
    .filter-tabs {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .filter-tab-btn {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }
    .view-toggle-group {
        width: 100%;
        justify-content: center;
    }
    .view-btn {
        flex: 1;
        justify-content: center;
    }
}


.user-directory-container {
    padding: 40px 20px;
    background-color: var(--light-bg);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, sans-serif;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Profile Card --- */
.premium-user-card {
    background: var(--card-bg);
    border-radius: 40px; /* Very large radius like image */
    box-shadow: var(--shadow-soft);
    padding: 10px; /* Inset padding for everything */
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}



/* --- Banner Section --- */
.user-card-banner {
    height: 130px;
    background: #f0f7ff; /* Base light blue */
    border-radius: 32px; /* Rounded banner inside card */
    position: relative;
    overflow: hidden;
}

/* Abstract Blobs for authentic Dribbble look */
.user-card-banner::before,
.user-card-banner::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.user-card-banner::before {
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(111, 168, 255, 0.6) 0%, rgba(111, 168, 255, 0) 70%);
    top: -20px;
    right: -20px;
}

.user-card-banner::after {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(111, 168, 255, 0.4) 0%, rgba(111, 168, 255, 0) 70%);
    bottom: -10px;
    right: 40px;
}

/* --- Profile Info --- */
.user-card-content {
    padding: 0 12px 12px 12px;
    position: relative;
}

.user-avatar-overlap {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-top: -36px;
    margin-left: 12px;
    position: relative;
    z-index: 10;
    object-fit: cover;
    background: #fff;
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Center Name and Online text */
    margin-bottom: 6px;
    margin-top: 14px;
}

.user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name {
    color: var(--text-main);
    margin: 0;
}

.verified-icon {
    color: var(--accent-purple);
    font-size: 1.1rem;
    display: flex;
}

.user-designation {
    color: var(--text-muted);
    font-weight: 500;
    margin: 0 0 18px 0; /* Space to stats */
}

.online-status {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: var(--status-green);
    border-radius: 50%;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #bcbcbc; /* Light gray from image */
}

/* --- Stats Section --- */
.user-stats-container {
    display: flex;
    background-color: #f6f9fc;
    border-radius: 20px;
    padding: 14px 0;
    justify-content: space-around;
    align-items: center;
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-value {
    display: block;
    color: var(--text-main);
    margin-bottom: 1px;
}

.stat-label {
    display: block;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 24px;
    background-color: #e5eaf1;
}

/* --- Action Button --- */
.btn-get-touch {
    width: 100%;
    height: 52px;
    background-color: #0d0d0d;
    color: #ffffff;
    border: none;
    border-radius: 18px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-get-touch:hover {
    background-color: #222;
    transform: scale(0.98);
}

.designer-actions-premium {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-follow-premium {
    flex: 1;
    height: 44px;
    background-color: #0d0d0d;
    color: #ffffff;
    border: none;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-follow-premium.following {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn-message-premium {
    width: 44px;
    height: 44px;
    background-color: #f8fafc;
    color: #0d0d0d;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-message-premium:hover {
    background-color: #f1f5f9;
    transform: scale(0.98);
}


/* Responsive tweaks */
@media (max-width: 480px) {
    .user-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Skeleton Loading --- */
.skeleton-pulse {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    pointer-events: none;
    border-color: rgba(0,0,0,0.03) !important;
}

.skeleton-line {
    background: #f0f0f0;
    border-radius: 4px;
}

.name-line {
    width: 60%;
    height: 20px;
    margin-bottom: 12px;
}

.designation-line {
    width: 40%;
    height: 14px;
}

.skeleton-card .user-card-banner {
    background: #f0f0f0 !important;
}

.skeleton-card .user-card-banner::before,
.skeleton-card .user-card-banner::after {
    display: none !important;
}

.skeleton-card .user-avatar-overlap {
    background: #f0f0f0 !important;
    border-color: #fff !important;
}

/* --- List View Card --- */
.designer-list-card {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.designer-list-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.list-user-info {
    display: flex;
    gap: 16px;
    align-items: center;
}

.list-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

.list-user-details h5 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.pro-badge {
    background: #111;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 800;
    margin-left: 8px;
    vertical-align: middle;
}

.list-designation {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.list-actions {
    display: flex;
    gap: 12px;
}

.btn-list-follow {
    border: 1px solid #ddd;
    background: #fff;
    color: #111;
    font-weight: 600;
    border-radius: 99px;
    padding: 8px 24px;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-list-follow.following {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.btn-list-message {
    background: #111;
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: 99px;
    padding: 8px 24px;
    font-size: 14px;
    transition: all 0.2s;
}

.list-stats-row {
    display: flex;
    gap: 24px;
    align-items: center;
}

.list-stat {
    text-align: left;
}

.list-stat .value {
    font-size: 16px;
    font-weight: 700;
    display: block;
}

.list-stat .label {
    font-size: 12px;
    color: var(--text-muted);
}

.badge-rising {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.list-bio {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    max-width: 800px;
}

.list-previews {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 10px;
}

.list-preview-item {
    aspect-ratio: 4/3;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.list-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.list-preview-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .list-card-header {
        flex-direction: column;
        gap: 16px;
    }
    .list-actions {
        width: 100%;
    }
    .list-actions button {
        flex: 1;
    }
    .list-previews {
        grid-template-columns: repeat(2, 1fr);
    }
}
