/* =========================================
   Arquivo: filex/css/perfil.css
   XONA — PERFIL (CSS específico)
   Requer main.css + postagem.css carregados antes.
   ========================================= */

/* =========================================
   PÁGINA DE PERFIL — OCUPA TODA A LARGURA
   ========================================= */
.profile-page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 24px 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}

.profile-page > * {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.profile-cover,
.profile-info,
.profile-tabs,
.profile-posts {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}

/* =========================================
   CAPA
   ========================================= */
.profile-cover {
    position: relative;
    aspect-ratio: 3 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}
.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.profile-cover-edit {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background-color 0.2s;
}
.profile-cover-edit:hover { background: rgba(0, 0, 0, 0.75); }

/* =========================================
   BLOCO DE INFO
   ========================================= */
.profile-info {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0 22px 22px;
    position: relative;
    transition: background-color 0.3s, border-color 0.3s;
}

.profile-avatar-wrapper {
    position: relative;
    width: 130px;
    height: 130px;
    margin-top: -65px;
    margin-bottom: 12px;
}
.profile-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-pink);
    background-color: var(--bg-dark);
}
.profile-avatar-online {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #22c55e;
    border: 3px solid var(--bg-card);
}

.profile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.profile-identity { min-width: 0; }

.profile-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-username {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-header-actions { display: flex; gap: 8px; }
.profile-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}
.profile-icon-btn:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.profile-bio {
    margin-top: 14px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-secondary);
}
.profile-meta i {
    color: var(--accent-pink);
    margin-right: 4px;
}

/* =========================================
   ESTATÍSTICAS
   ========================================= */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}
.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.profile-stat strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.profile-stat span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =========================================
   BOTÕES DE AÇÃO
   ========================================= */
.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}
.btn-primary,
.btn-outline {
    flex: 1;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background-color: var(--accent-pink);
    color: #fff;
    border: none;
}
.btn-primary:hover { background-color: var(--accent-pink-hover); }
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

/* =========================================
   ABAS
   ========================================= */
.profile-tabs {
    display: flex;
    gap: 4px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
}
.profile-tabs::-webkit-scrollbar { display: none; }

.profile-tab {
    flex: 1;
    white-space: nowrap;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.profile-tab i { font-size: 15px; }
.profile-tab:hover {
    color: var(--text-primary);
    background-color: var(--bg-dark);
}
.profile-tab.active {
    background-color: var(--accent-pink);
    color: #fff;
}

/* =========================================
   FEED DE PUBLICAÇÕES — container
   O .post-card e as media vêm do postagem.css.
   ========================================= */
.profile-posts {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 768px) {

    .profile-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 10px 130px !important;
        gap: 12px;
    }

    /* Capa */
    .profile-cover {
        aspect-ratio: 16 / 9;
        border-radius: var(--radius-md);
    }
    .profile-cover-edit {
        top: 10px;
        right: 10px;
        font-size: 12px;
        padding: 6px 10px;
    }

    /* Info */
    .profile-info {
        padding: 0 14px 16px;
        border-radius: var(--radius-md);
    }
    .profile-avatar-wrapper {
        width: 96px;
        height: 96px;
        margin-top: -48px;
        margin-bottom: 8px;
    }
    .profile-avatar {
        width: 96px;
        height: 96px;
        border-width: 3px;
    }
    .profile-avatar-online {
        width: 16px;
        height: 16px;
        bottom: 4px;
        right: 4px;
    }
    .profile-name { font-size: 18px; }
    .profile-username { font-size: 13px; }
    .profile-bio { font-size: 14px; }
    .profile-meta { font-size: 12px; gap: 10px; }

    .profile-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-top: 14px;
        padding-top: 14px;
    }
    .profile-stat strong { font-size: 15px; }
    .profile-stat span { font-size: 11px; }

    .profile-actions { gap: 8px; margin-top: 14px; }
    .btn-primary,
    .btn-outline {
        padding: 10px 12px;
        font-size: 13px;
    }

    .profile-tabs {
        padding: 4px;
        border-radius: var(--radius-md);
    }
    .profile-tab {
        font-size: 13px;
        padding: 8px 12px;
        gap: 6px;
    }
    .profile-tab i { font-size: 13px; }

    /* Feed de publicações */
    .profile-posts {
        gap: 14px;
    }
}