/* Ricerca profili e classifica (Views/Profiles): le schede seguono l'aspetto delle schede degli annunci (css/search/cards.css, .sale-card),
   il pannello dei filtri e' quello delle ricerche (css/search.css). Variabili di header.css con i valori di ripiego di cards.css */

.profile-grid {
    margin-left: -.9rem;
    margin-right: -.9rem;
}

.profile-grid__item {
    padding-left: .9rem;
    padding-right: .9rem;
    margin-bottom: 1.5rem;
}

.profile-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    padding: 1.5rem 1rem 1.25rem;
    border: 1px solid var(--border, #e2e4ec);
    border-radius: 14px;
    background: var(--bg, #fff);
    box-shadow: 0 1px 2px rgba(21, 26, 45, .04);
    color: var(--ink, #151a2d);
    text-align: center;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

    .profile-card:hover, .profile-card:focus {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(21, 26, 45, .12);
        color: var(--ink, #151a2d);
        text-decoration: none;
    }

.profile-card__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin-bottom: .75rem;
    overflow: hidden;
    border: 3px solid var(--border, #e2e4ec);
    border-radius: 50%;
    background: #eef0f5;
    color: #6c7a96;
    font-size: 2.6rem;
}

    .profile-card__avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.profile-card__name {
    max-width: 100%;
    margin-bottom: .6rem;
    overflow: hidden;
    font-size: 1.1rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-card__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
}

.profile-card__stat {
    padding: .2rem .6rem;
    border-radius: 999px;
    background: #f1f3f8;
    color: #4a5672;
    font-size: .8rem;
}

    .profile-card__stat i {
        margin-right: .2rem;
        color: var(--accent, #1478a6);
    }

.profile-card__rank {
    position: absolute;
    top: .75rem;
    left: .75rem;
    min-width: 2.2rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: #eef0f5;
    color: #4a5672;
    font-size: .8rem;
    font-weight: 700;
}

.profile-card__rank--podium {
    background: #ffd34d;
    color: #5b4300;
}

.profile-empty {
    padding: 3rem 1rem;
}

.profile-top-header {
    margin-bottom: 1.25rem;
}

/* la barra dei risultati (css/search.css) con due selezioni: ordine e verso */
#profileSortForm .results-toolbar__sort {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

@media (prefers-reduced-motion: reduce) {
    .profile-card {
        transition: none;
    }

        .profile-card:hover, .profile-card:focus {
            transform: none;
        }
}
