/* Shared loading skeleton for private and public profiles. */

.profile-skeleton-content {
    display: block;
}

.profile-skeleton-cover,
.profile-skeleton-avatar,
.profile-skeleton-actions,
.profile-skeleton-identity span,
.profile-skeleton-bio span,
.profile-skeleton-stats span,
.profile-skeleton-section-title,
.profile-skeleton-posters span {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.055),
        rgba(198, 139, 93, 0.16),
        rgba(255, 255, 255, 0.055)
    );
    background-size: 220% 100%;
    animation: profile-skeleton-shimmer 1400ms ease-in-out infinite;
}

.profile-skeleton-header {
    width: 100%;
    margin-bottom: 14px;
}

.profile-skeleton-cover {
    height: 145px;
    margin-inline: -20px;
}

.profile-skeleton-header-body {
    position: relative;
    margin-top: -34px;
    padding-inline: 12px;
}

.profile-skeleton-main-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.profile-skeleton-avatar {
    width: 86px;
    height: 86px;
    flex: 0 0 auto;
    border: 3px solid #120d0b;
    border-radius: 50%;
}

.profile-skeleton-actions {
    width: 78px;
    height: 30px;
    margin-bottom: 8px;
    border-radius: 999px;
}

.profile-skeleton-identity {
    display: grid;
    justify-items: start;
    gap: 3px;
    margin-top: 9px;
}

.profile-skeleton-identity span,
.profile-skeleton-bio span,
.profile-skeleton-section-title {
    display: block;
    border-radius: 999px;
}

.profile-skeleton-name {
    width: 48%;
    height: 34px;
}

.profile-skeleton-username {
    width: 32%;
    height: 14px;
}

.profile-skeleton-followers {
    width: min(150px, 80%);
    height: 24px;
    margin-top: 6px;
}

.profile-skeleton-bio {
    display: grid;
    justify-items: start;
    gap: 6px;
    margin-bottom: 24px;
}

.profile-skeleton-bio span {
    width: 82%;
    height: 14px;
}

.profile-skeleton-bio span:last-child {
    width: 52%;
}

.profile-skeleton-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-bottom: 28px;
}

.profile-skeleton-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    gap: 3px;
}

.profile-skeleton-stats span {
    width: 35px;
    height: 16px;
    border-radius: 999px;
}

.profile-skeleton-stats span:first-child {
    width: 20px;
    height: 20px;
}

.profile-skeleton-section {
    margin-top: 26px;
}

.profile-skeleton-section-heading {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 9px;
    margin-bottom: 12px;
}

.profile-skeleton-section-marker {
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: rgba(242, 90, 0, 0.25);
}

.profile-skeleton-section-title {
    width: 132px;
    height: 22px;
}

.profile-skeleton-posters {
    display: flex;
    gap: 12px;
    overflow: hidden;
}

.profile-skeleton-posters span {
    width: 112px;
    aspect-ratio: 2 / 3;
    flex: 0 0 auto;
    border-radius: 14px;
}

@keyframes profile-skeleton-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 767.98px) {
    .profile-skeleton-cover {
        margin-inline: -14px;
    }

    .profile-skeleton-posters span {
        width: calc((100% - 24px) / 3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .profile-skeleton-cover,
    .profile-skeleton-avatar,
    .profile-skeleton-actions,
    .profile-skeleton-identity span,
    .profile-skeleton-bio span,
    .profile-skeleton-stats span,
    .profile-skeleton-section-title,
    .profile-skeleton-posters span {
        animation: none;
    }
}
